diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 582fdd0fd86ff00f0d9ee5b11528fb1897b906b7..e0e8244a1ca585cf080ac4cd442f38b15b61e85a 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -38,12 +38,9 @@ class Tap def self.from_path(path) match = File.expand_path(path).match(HOMEBREW_TAP_PATH_REGEX) - raise "Invalid tap path '#{path}'" unless match + return if match.blank? || match[:user].blank? || match[:repo].blank? fetch(match[:user], match[:repo]) - rescue - # No need to error as a nil tap is sufficient to show failure. - nil end def self.default_cask_tap