diff options
Diffstat (limited to 'cmdline/apt-key.in')
-rw-r--r-- | cmdline/apt-key.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in index d34f59497..199903d61 100644 --- a/cmdline/apt-key.in +++ b/cmdline/apt-key.in @@ -474,12 +474,27 @@ if [ -z "$command" ]; then fi shift +find_gpgv_status_fd() { + while [ -n "$1" ]; do + if [ "$1" = '--status-fd' ]; then + shift + echo "$1" + break + fi + shift + done +} +GPGSTATUSFD="$(find_gpgv_status_fd "$@")" + warn() { if [ -z "$GPGHOMEDIR" ]; then echo >&2 'W:' "$@" else echo 'W:' "$@" > "${GPGHOMEDIR}/aptwarnings.log" fi + if [ -n "$GPGSTATUSFD" ]; then + echo >&${GPGSTATUSFD} '[APTKEY:] WARNING' "$@" + fi } cleanup_gpg_home() { |