]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
suppress auth-agent warning
authorelijah <elijah@riseup.net>
Thu, 25 Oct 2012 20:56:19 +0000 (13:56 -0700)
committerelijah <elijah@riseup.net>
Thu, 25 Oct 2012 20:56:19 +0000 (13:56 -0700)
lib/leap_cli/commands/user.rb
lib/leap_cli/commands/util.rb

index ed56ff4de1180f11d57490c6a9615c35ebf39164..5f1b2d914ff1a27dee6b8ddb81224a1502b88d86 100644 (file)
@@ -65,8 +65,8 @@ module LeapCli
         ssh_keys << SshKey.load(keyfile)
       end
 
-      if `which ssh-add && ssh-add -L`.strip.any?
-        `ssh-add -L`.split("\n").compact.each do |line|
+      if `which ssh-add`.strip.any?
+        `ssh-add -L 2> /dev/null`.split("\n").compact.each do |line|
           key = SshKey.load(line)
           key.comment = 'ssh-agent'
           ssh_keys << key unless ssh_keys.include?(key)
@@ -102,7 +102,7 @@ module LeapCli
       if secret_keys.length > 1
         key_index = numbered_choice_menu('Choose your OpenPGP public key', secret_keys) do |key, i|
           key_info = key.to_s.split("\n")[0..1].map{|line| line.sub(/^\s*(sec|uid)\s*/,'')}.join(' -- ')
-          say("#{i+1}.  #{key_info}")
+          say("#{i+1}. #{key_info}")
         end
       else
         key_index = 0
index 46fe44b12b853fd14c4285a1b31e74a71eebaf5d..aa888e04efa2bf280154ec1448bcdc20a6a85742 100644 (file)
@@ -16,7 +16,7 @@ module LeapCli; module Commands
     while true
       say("\n" + msg + ':')
       items.each_with_index &block
-      say("q.  quit")
+      say("q. quit")
       index = ask("number 1-#{items.length}> ")
       if index.empty?
         next