From 3e1a92bac08815836957c2506a617aab95971f26 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Wed, 15 Jan 2025 20:53:00 +0800 Subject: [PATCH] fix error when SSH_CLIENT is unbind in pinentry script --- pkgs/pinentry-selector.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/pinentry-selector.nix b/pkgs/pinentry-selector.nix index a2ecc9c..55c722f 100644 --- a/pkgs/pinentry-selector.nix +++ b/pkgs/pinentry-selector.nix @@ -9,10 +9,10 @@ pkgs.writeShellApplication { /dev/tty[1-9]) pinentry-curses;; /dev/pts/*) - if [ -z "$SSH_CLIENT" ]; then - pinentry-qt - else + if [ -v SSH_CLIENT ] && [ -n "$SSH_CLIENT" ]; then pinentry-curses + else + pinentry-qt fi ;; *)