aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-07 10:40:21 -0700
committerAdam Vandenberg2010-06-07 14:15:45 -0700
commit115940dbebe1add31013d9eee514709620e03e68 (patch)
tree576427361b774b6dbcaf0c15ad6d0fdcb18d943c
parentf08431b5a13f7af049214ffe08fce85b8ab32ee7 (diff)
downloadbrew-115940dbebe1add31013d9eee514709620e03e68.tar.bz2
Tweak the bin/brew command selector a bit.
* Move 'brew doctor' above both unknown command blocks and then... * Merge unknown command blocks. (This is cleanup for supporting external brew commands.)
-rwxr-xr-xbin/brew9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/brew b/bin/brew
index fad55c2de..194232c49 100755
--- a/bin/brew
+++ b/bin/brew
@@ -372,15 +372,16 @@ begin
end
end
- when 'branch', 'checkout', 'pull', 'push', 'rebase', 'reset'
- onoe "Unknown command: #{arg} (did you mean 'git #{arg}'?)"
-
when 'doctor'
require 'brew_doctor'
brew_doctor
else
- onoe "Unknown command: #{arg}"
+ if ['branch', 'checkout', 'pull', 'push', 'rebase', 'reset'].include? arg
+ onoe "Unknown command: #{arg} (did you mean 'git #{arg}'?)"
+ else
+ onoe "Unknown command: #{arg}"
+ end
end
rescue FormulaUnspecifiedError