summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-key.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index e231d6f61..eab5805b0 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -466,8 +466,23 @@ 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() {
echo >&2 'W:' "$@"
+ if [ -n "$GPGSTATUSFD" ]; then
+ echo >&${GPGSTATUSFD} '[APTKEY:] WARNING' "$@"
+ fi
}
create_gpg_home() {