diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-07 02:42:03 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-07 02:42:03 +0300 |
commit | 44862ec8f8b08104f56a948196ef08650acbcfdf (patch) | |
tree | 089d6ffdb3fb5682f087560971fd0a41c24c9830 | |
parent | add strip_pgn_clk (diff) | |
download | linux-home-44862ec8f8b08104f56a948196ef08650acbcfdf.tar.gz linux-home-44862ec8f8b08104f56a948196ef08650acbcfdf.zip |
spawn_ssh_agent: command instead of which
Diffstat (limited to '')
-rw-r--r-- | .bash_profile | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.bash_profile b/.bash_profile index 2732697..f33ed86 100644 --- a/.bash_profile +++ b/.bash_profile @@ -45,15 +45,14 @@ fi spawn_ssh_agent() { if [ -z "${SSH_AGENT_PID:+x}" -o -z "${SSH_AUTH_SOCK:+x}" ]; then - local ssh_agent - ssh_agent="$( which ssh-agent 2> /dev/null )" || return $? + local ssh_agent="$( command -v ssh-agent )" || return $? eval "$( "$ssh_agent" -s )" > /dev/null || return $? trap "kill $SSH_AGENT_PID" 0 ssh-add || return $? fi } -if [ "$( uname -o )" == "Cygwin" ]; then +if [ "$( uname -o )" == 'Cygwin' ]; then spawn_ssh_agent fi |