make sure pinentry can accept args

This commit is contained in:
ulic-youthlic 2025-01-17 13:08:06 +08:00
parent 374b8435a8
commit 7fb3361906
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -8,18 +8,18 @@ pkgs.writeShellApplication {
if [ -v XDG_SESSION_TYPE ]; then
case $XDG_SESSION_TYPE in
tty)
pinentry-tty;;
pinentry-tty $@;;
*)
pinentry-gnome3;;
pinentry-gnome3 $@;;
esac
elif [ -v SSH_CLIENT ] && [ -n "$SSH_CLIENT" ]; then
pinentry-tty
pinentry-tty $@
elif [ -v WAYLAND_DISPLAY ] && [ -n "$WAYLAND_DISPLAY" ]; then
pinentry-gnome3
pinentry-gnome3 $@
elif [ -v DISPLAY ] && [ -n "$DISPLAY" ]; then
pinentry-gnome3
pinentry-gnome3 $@
else
pinentry-tty
pinentry-tty $@
fi
'';
}