1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-30 21:05:02 +01:00

gpg-agent: prevent nushell crashing on non-interactive sessions

This commit is contained in:
Joaquín Triñanes 2024-09-18 15:38:08 +02:00
parent e83414058e
commit a50f7910e6
No known key found for this signature in database
GPG key ID: 6E1446DD451C6BAF

View file

@ -27,7 +27,9 @@ let
'' + optionalString cfg.enableSshSupport gpgSshSupportStr; '' + optionalString cfg.enableSshSupport gpgSshSupportStr;
gpgNushellInitStr = '' gpgNushellInitStr = ''
$env.GPG_TTY = (tty) if (is-terminal --stdin) {
$env.GPG_TTY = (tty)
}
'' + optionalString cfg.enableSshSupport '' '' + optionalString cfg.enableSshSupport ''
${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore ${gpgPkg}/bin/gpg-connect-agent updatestartuptty /bye | ignore