aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-10-25 13:56:19 -0700
committerelijah <elijah@riseup.net>2012-10-25 13:56:19 -0700
commit0b3bf4b04e558b5cccca0a3821de3e6af60aada5 (patch)
tree975b3ff7c0ede1ce2ef62e14d9852a385e403e3c
parent27aab7d4cf1aeb3dce6d72d1ac12fcf0d9bdd57b (diff)
downloadleap_cli-0b3bf4b04e558b5cccca0a3821de3e6af60aada5.tar.gz
leap_cli-0b3bf4b04e558b5cccca0a3821de3e6af60aada5.tar.bz2
suppress auth-agent warning
-rw-r--r--lib/leap_cli/commands/user.rb6
-rw-r--r--lib/leap_cli/commands/util.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/leap_cli/commands/user.rb b/lib/leap_cli/commands/user.rb
index ed56ff4..5f1b2d9 100644
--- a/lib/leap_cli/commands/user.rb
+++ b/lib/leap_cli/commands/user.rb
@@ -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
diff --git a/lib/leap_cli/commands/util.rb b/lib/leap_cli/commands/util.rb
index 46fe44b..aa888e0 100644
--- a/lib/leap_cli/commands/util.rb
+++ b/lib/leap_cli/commands/util.rb
@@ -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