From 0382134cf87321166fb8f03223e21b1d242ad7cb Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Sun, 10 Apr 2016 22:53:17 +0200 Subject: 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). --- Library/brew.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3