Browse files

simplified addon errors

  • Loading branch information...
1 parent 82e0b55 commit 9c09ae594889eb58f1d895617720680712684a0d @pedro pedro committed May 15, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/heroku/commands/addons.rb
View
6 lib/heroku/commands/addons.rb
@@ -57,18 +57,18 @@ def addon_run
yield
'Done.'
rescue RestClient::ResourceNotFound => e
- "FAILED" + addon_error("no addon by that name")
+ addon_error("no addon by that name")
rescue RestClient::RequestFailed => e
if e.http_code == 402
confirm_billing ? retry : 'Canceled'
else
error = Heroku::Command.extract_error(e.response.body)
- "FAILED" + addon_error(error)
+ addon_error(error)
end
end
def addon_error(message)
- "\n" + message.split("\n").map { |line| '! ' + line }.join("\n")
+ "FAILED\n" + message.split("\n").map { |line| '! ' + line }.join("\n")
end
end
end

0 comments on commit 9c09ae5

Please sign in to comment.