From b8e35995d5629f7b6ed1f04988accf01b7b59eef Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 26 Jan 2021 10:52:33 +0100 Subject: [PATCH] Use pinentry-tty only if installed. Restore fallback to curses version --- pinentry-wrapper | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pinentry-wrapper b/pinentry-wrapper index fd714ca..6dd72c5 100755 --- a/pinentry-wrapper +++ b/pinentry-wrapper @@ -71,12 +71,12 @@ then elif [ -n "$DISPLAY" -a -x /usr/bin/pinentry-qt ] then export PINENTRY_BINARY="/usr/bin/pinentry-qt" -# use pinentry-curses for interactive mode -elif [ -t 0 -a -t 1 ]; +# use pinentry-tty if installed +elif [ -x /usr/bin/pinentry-tty ] then - export PINENTRY_BINARY="/usr/bin/pinentry-curses" -# fallback to pinentry-tty in no TTY is provided -else export PINENTRY_BINARY="/usr/bin/pinentry-tty" +# pinentry-curses is installed by default +else + export PINENTRY_BINARY="/usr/bin/pinentry-curses" fi exec $PINENTRY_BINARY "$@"