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
commitef27207e13c8ed0c4b1a33323081bbe0092c026c (patch)
treeb7eec6ae29737000b33daff7270d9c2977dd3e21 /bin
parentbc81737e2d3b4112e84c5bb7dcf8f9463fba3290 (diff)
downloadhomebrew-ef27207e13c8ed0c4b1a33323081bbe0092c026c.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