aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-04-10 22:53:17 +0200
committerMartin Afanasjew2016-04-10 22:59:25 +0200
commit0382134cf87321166fb8f03223e21b1d242ad7cb (patch)
treec2a4c3ef7cd7c40652b75e9bf7da96131fa69e00 /Library
parent10edfcd218daf522db5a9d43a368572441dc0b5a (diff)
downloadbrew-0382134cf87321166fb8f03223e21b1d242ad7cb.tar.bz2
brew.rb: adjust behavior for undocumented commands
Don't exit with a non-zero status code just because an internal command happens to be undocumented. Also print the generic help in these cases to provide some help (including a reference to the man page).
Diffstat (limited to 'Library')
-rw-r--r--Library/brew.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/brew.rb b/Library/brew.rb
index 4c7cc8d65..a70c5755e 100644
--- a/Library/brew.rb
+++ b/Library/brew.rb
@@ -83,8 +83,9 @@ begin
if help_text.nil?
# External command, let it handle help by itself
elsif help_text.empty?
- puts "No help available for #{cmd}"
- exit 1
+ opoo "No help available for '#{cmd}' command."
+ puts ARGV.usage
+ exit 0
else
puts help_text
exit 0