aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMisty De Meo2012-08-22 19:55:27 -0500
committerMisty De Meo2012-08-22 19:55:27 -0500
commit78dcafaa10fa37b07bb519f3b668a5c761376abb (patch)
treef6887fc28c4eba3fdd9ff865bd92dbef5220bdd5 /bin
parent1f8af42feef19bdb2aa7f508c8486eea32a75993 (diff)
downloadbrew-78dcafaa10fa37b07bb519f3b668a5c761376abb.tar.bz2
brew: downcase arg before sending to Homebrew
Fixes a case where brew would find commands with wrongly-capitalized user input on case-insensitive systems, then error out with a confusing message when an invalid method was sent to Homebrew. e.g.: > brew Update Error: undefined method `Update' for Homebrew:Module
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index ed410fa7a..77b2f59bb 100755
--- a/bin/brew
+++ b/bin/brew
@@ -77,7 +77,7 @@ begin
elsif require? `/usr/bin/which brew-#{cmd}.rb`
exit 0
elsif require? HOMEBREW_REPOSITORY/"Library/Homebrew/cmd"/cmd
- Homebrew.send cmd.to_s.gsub('-', '_')
+ Homebrew.send cmd.to_s.gsub('-', '_').downcase
else
onoe "Unknown command: #{cmd}"
exit 1