From 27aab7d4cf1aeb3dce6d72d1ac12fcf0d9bdd57b Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 25 Oct 2012 13:47:50 -0700 Subject: make gpg optional --- lib/leap_cli/commands/user.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/commands/user.rb') 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| -- cgit v1.2.3