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).
This commit is contained in:
parent
10edfcd218
commit
0382134cf8
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user