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:
Martin Afanasjew 2016-04-10 22:53:17 +02:00
parent 10edfcd218
commit 0382134cf8

View File

@ -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