diff options
author | elijah <elijah@riseup.net> | 2016-12-19 15:28:11 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-12-19 15:28:11 -0800 |
commit | dc43b30079316ed41bf95eca902d5d65ba877888 (patch) | |
tree | 3ab819e02eba41c6a91db1ceffdc49e15be9e931 /lib/leap_cli/commands | |
parent | 74f3f501aab17dc5d660af5d175c52bbcab5c5fe (diff) |
bugfix: ensure let's encrypt errors make it to the user.
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r-- | lib/leap_cli/commands/ca.rb | 6 |
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" |