Skip to content

Commit

Permalink
[Command] Don't print error report in development environments
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Mar 6, 2013
1 parent 419b21d commit 189917d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/cocoapods/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ def self.run(argv)
UI.print_warnings
end

def self.report_error(error)
if error.is_a?(Interrupt)
def self.report_error(exception)
if exception.is_a?(Interrupt)
puts "[!] Cancelled".red
Config.instance.verbose? ? raise : exit(1)
else
puts UI::ErrorReport.report(error)
exit 1
if ENV['COCOA_PODS_ENV'] != 'development'
puts UI::ErrorReport.report(exception)
exit 1
else
raise exception
end
end
end

Expand All @@ -54,7 +58,7 @@ def self.report_error(error)
#
# @todo Move silent flag to CLAide.
#
# @note It is importat that the commadnds don't overide the default
# @note It is important that the commands don't override the default
# settings if their flag is missing (i.e. their value is nil)
#
def initialize(argv)
Expand Down

0 comments on commit 189917d

Please sign in to comment.