We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea134ac commit 4a67d29Copy full SHA for 4a67d29
keychain.sh
@@ -1095,7 +1095,12 @@ if wantagent gpg; then
1095
set +f # re-enable globbing
1096
1097
for k in "$@"; do
1098
- echo | env LC_ALL="$pinentry_lc_all" "${gpg_prog_name}" --no-options --use-agent --no-tty --sign --local-user "$k" -o- >/dev/null 2>&1 || tryagain=true
+ gpgout="$(echo | env LC_ALL="$pinentry_lc_all" "${gpg_prog_name}" --no-options --use-agent --no-tty --sign --local-user "$k" -o- 2>&1)"
1099
+ ret=$?
1100
+ if [ "$ret" -ne 0 ]; then
1101
+ tryagain=true
1102
+ warn "Error adding gpg key (error code: $ret; output: $gpgout)"
1103
+ fi
1104
done
1105
$tryagain || break
1106
0 commit comments