From ea13d62ce0f23f22abd14e04cf87ce6babb07ef5 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Thu, 23 Jul 2015 23:57:11 +0200 Subject: brew: print bug report URL for internal commands only Closes Homebrew/homebrew#42069. Signed-off-by: Baptiste Fontaine --- Library/brew.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/brew.rb b/Library/brew.rb index abe7f847a..24b72fc9d 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -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 -- cgit v1.2.3