Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

simplified addon errors

  • Loading branch information...
commit 9c09ae594889eb58f1d895617720680712684a0d 1 parent 82e0b55
Pedro Belo pedro authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 lib/heroku/commands/addons.rb
6 lib/heroku/commands/addons.rb
@@ -57,18 +57,18 @@ def addon_run
57 57 yield
58 58 'Done.'
59 59 rescue RestClient::ResourceNotFound => e
60   - "FAILED" + addon_error("no addon by that name")
  60 + addon_error("no addon by that name")
61 61 rescue RestClient::RequestFailed => e
62 62 if e.http_code == 402
63 63 confirm_billing ? retry : 'Canceled'
64 64 else
65 65 error = Heroku::Command.extract_error(e.response.body)
66   - "FAILED" + addon_error(error)
  66 + addon_error(error)
67 67 end
68 68 end
69 69
70 70 def addon_error(message)
71   - "\n" + message.split("\n").map { |line| '! ' + line }.join("\n")
  71 + "FAILED\n" + message.split("\n").map { |line| '! ' + line }.join("\n")
72 72 end
73 73 end
74 74 end

0 comments on commit 9c09ae5

Please sign in to comment.
Something went wrong with that request. Please try again.