summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-12-19 15:28:11 -0800
committerelijah <elijah@riseup.net>2016-12-19 15:28:11 -0800
commitdc43b30079316ed41bf95eca902d5d65ba877888 (patch)
tree3ab819e02eba41c6a91db1ceffdc49e15be9e931
parent74f3f501aab17dc5d660af5d175c52bbcab5c5fe (diff)
bugfix: ensure let's encrypt errors make it to the user.
-rw-r--r--lib/leap_cli/commands/ca.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/ca.rb b/lib/leap_cli/commands/ca.rb
index 3c5fc7d5..1c67ae67 100644
--- a/lib/leap_cli/commands/ca.rb
+++ b/lib/leap_cli/commands/ca.rb
@@ -281,11 +281,13 @@ module LeapCli; module Commands
if status == 'valid'
log 'authorized!', color: :green, style: :bold
elsif status == 'error'
- bail! :error, message
+ bail! :error, message.inspect
elsif status == 'unauthorized'
- bail!(:unauthorized, message, color: :yellow, style: :bold) do
+ bail!(:unauthorized, message.inspect, color: :yellow, style: :bold) do
log 'You must first run `leap cert register` to register the account key with letsencrypt.org'
end
+ else
+ bail!(:error, "unrecognized status: #{status.inspect}, #{message.inspect}")
end
log :fetching, "new certificate from letsencrypt.org"