From: elijah Date: Thu, 25 Oct 2012 20:47:50 +0000 (-0700) Subject: make gpg optional X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=27aab7d4cf1aeb3dce6d72d1ac12fcf0d9bdd57b;p=leap%2Fleap_cli.git make gpg optional --- diff --git a/lib/leap_cli/commands/user.rb b/lib/leap_cli/commands/user.rb index 5f7702a..ed56ff4 100644 --- a/lib/leap_cli/commands/user.rb +++ b/lib/leap_cli/commands/user.rb @@ -92,9 +92,12 @@ module LeapCli # def pick_pgp_key secret_keys = GPGME::Key.find(:secret) + if secret_keys.empty? + progress("Skipping OpenPGP setup because I could not find any OpenPGP keys for you") + return nil + end assert_bin! 'gpg' - assert! secret_keys.any?, 'Sorry, could not find any OpenPGP keys for you.' if secret_keys.length > 1 key_index = numbered_choice_menu('Choose your OpenPGP public key', secret_keys) do |key, i|