Commit d0a06bf2 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Command] Use a case statement in Pod::Command#report_error

Addresses https://github.com/CocoaPods/CocoaPods/commit/0c80af37f1fec0009ad63277309afa47ad22595f#commitcomment-7718723.
parent 33b60b6d
...@@ -48,11 +48,12 @@ module Pod ...@@ -48,11 +48,12 @@ module Pod
end end
def self.report_error(exception) def self.report_error(exception)
if exception.is_a?(Interrupt) case exception
when Interrupt
puts '[!] Cancelled'.red puts '[!] Cancelled'.red
Config.instance.verbose? ? raise : exit(1) Config.instance.verbose? ? raise : exit(1)
elsif exception.is_a?(SystemExit) when SystemExit
raise exception raise
else else
if ENV['COCOA_PODS_ENV'] != 'development' if ENV['COCOA_PODS_ENV'] != 'development'
puts UI::ErrorReport.report(exception) puts UI::ErrorReport.report(exception)
......
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