diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-11-20 12:57:16 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2024-11-20 12:57:50 +0800 |
commit | 7c9e274a7ac1a97315bce625af2be40ef7afb1c3 (patch) | |
tree | 010ea68ab68c123a5683a987bbe93dbdddd43f5a | |
parent | 8a8c62b59cc70633f3d0d55e916848be28088c61 (diff) |
profile: Set GPG_TTY for GnuPG
-rw-r--r-- | postlfs/config/profile.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/postlfs/config/profile.xml b/postlfs/config/profile.xml index 935d9308f9..0c6b058323 100644 --- a/postlfs/config/profile.xml +++ b/postlfs/config/profile.xml @@ -175,6 +175,10 @@ export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share} export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg} export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER} +# GnuPG wants this or it'll fail with pinentry-curses under some +# circumstances (for example signing a Git commit) +tty -s && export GPG_TTY=$(tty) + # Set up a red prompt for root and a green one for users. NORMAL="\[\e[0m\]" RED="\[\e[1;31m\]" |