Skip to content

Commit

Permalink
ssh-copy-id.sh: empty ssh-agent on Snow Leopard
Browse files Browse the repository at this point in the history
On Snow Leopard, ssh-add -L outputs a warning to stdout when the agent
has no identities. Compensate for this by removing the warning from
the output with grep.
  • Loading branch information
barrbrain committed Mar 22, 2013
1 parent 88d193b commit 8b0c9c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh-copy-id.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ "-i" = "$1" ]; then
fi
else
if [ x$SSH_AUTH_SOCK != x ] ; then
GET_ID="$GET_ID ssh-add -L"
GET_ID="$GET_ID ssh-add -L | grep -vxF 'The agent has no identities.'"
fi
fi

Expand Down

0 comments on commit 8b0c9c5

Please sign in to comment.