aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/tap.rb
diff options
context:
space:
mode:
authorShaun Jackman2017-10-18 23:32:06 -0700
committerShaun Jackman2017-10-22 08:52:16 -0700
commitf9d42659ea951896733f49394a50366fb55eaafb (patch)
treeddf49eb4e7e65ff36132861679265c6bd9201d3b /Library/Homebrew/tap.rb
parenta08f1c674803824e291c326adc2aca80068020e6 (diff)
downloadbrew-f9d42659ea951896733f49394a50366fb55eaafb.tar.bz2
pull: Fix pull --bottle 1234
Fix the error: Error: undefined method `casecmp' for nil:NilClass
Diffstat (limited to 'Library/Homebrew/tap.rb')
-rw-r--r--Library/Homebrew/tap.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb
index ebfc4cd80..2d1c47e32 100644
--- a/Library/Homebrew/tap.rb
+++ b/Library/Homebrew/tap.rb
@@ -26,11 +26,11 @@ class Tap
raise "Invalid tap name '#{args.join("/")}'"
end
- # we special case homebrew so users don't have to shift in a terminal
- user = "Homebrew" if user == "homebrew"
+ # We special case homebrew and linuxbrew so that users don't have to shift in a terminal.
+ user = user.capitalize if ["homebrew", "linuxbrew"].include? user
repo = repo.strip_prefix "homebrew-"
- if user == "Homebrew" && (repo == "homebrew" || repo == "core")
+ if ["Homebrew", "Linuxbrew"].include?(user) && ["core", "homebrew"].include?(repo)
return CoreTap.instance
end