fix re-splitting the elements in script

This commit is contained in:
ulic-youthlic 2025-01-17 13:20:37 +08:00
parent 5b0e9f96d1
commit 67b1830304
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

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