Commit 189917d7 authored by Fabio Pelosin's avatar Fabio Pelosin

[Command] Don't print error report in development environments

parent 419b21d6
...@@ -37,13 +37,17 @@ module Pod ...@@ -37,13 +37,17 @@ module Pod
UI.print_warnings UI.print_warnings
end end
def self.report_error(error) def self.report_error(exception)
if error.is_a?(Interrupt) if exception.is_a?(Interrupt)
puts "[!] Cancelled".red puts "[!] Cancelled".red
Config.instance.verbose? ? raise : exit(1) Config.instance.verbose? ? raise : exit(1)
else else
puts UI::ErrorReport.report(error) if ENV['COCOA_PODS_ENV'] != 'development'
exit 1 puts UI::ErrorReport.report(exception)
exit 1
else
raise exception
end
end end
end end
...@@ -54,7 +58,7 @@ module Pod ...@@ -54,7 +58,7 @@ module Pod
# #
# @todo Move silent flag to CLAide. # @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) # settings if their flag is missing (i.e. their value is nil)
# #
def initialize(argv) def initialize(argv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment