fix re-splitting the elements in script

This commit is contained in:
ulic-youthlic 2025-01-17 13:20:37 +08:00
parent defafa3c86
commit ca525c5789
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
'';
}