brew: print bug report URL for internal commands only

Closes Homebrew/homebrew#42069.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
Baptiste Fontaine 2015-07-23 23:57:11 +02:00
parent 0c47c8f864
commit ea13d62ce0

View File

@ -68,6 +68,7 @@ begin
empty_argv = ARGV.empty?
help_regex = /(-h$|--help$|--usage$|-\?$|^help$)/
help_flag = false
internal_cmd = true
cmd = nil
ARGV.dup.each_with_index do |arg, i|
@ -157,8 +158,10 @@ rescue RuntimeError, SystemCallError => e
exit 1
rescue Exception => e
onoe e
puts "#{Tty.white}Please report this bug:"
puts " #{Tty.em}#{OS::ISSUES_URL}#{Tty.reset}"
if internal_cmd
puts "#{Tty.white}Please report this bug:"
puts " #{Tty.em}#{OS::ISSUES_URL}#{Tty.reset}"
end
puts e.backtrace
exit 1
else