Move GPG agent availability check to the top
This commit is contained in:
parent
7a745425c4
commit
1ac20bc64a
@ -6,12 +6,12 @@
|
|||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
_gpg_env="$HOME/.gnupg/gpg-agent.env"
|
|
||||||
|
|
||||||
if (( ! $+commands[gpg-agent] )); then
|
if (( ! $+commands[gpg-agent] )); then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_gpg_env="$HOME/.gnupg/gpg-agent.env"
|
||||||
|
|
||||||
function _gpg-agent-start() {
|
function _gpg-agent-start() {
|
||||||
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}" > /dev/null
|
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}" > /dev/null
|
||||||
chmod 600 "${_gpg_env}"
|
chmod 600 "${_gpg_env}"
|
||||||
|
Reference in New Issue
Block a user