From 104ac5c719681090603d435a4142c8f05e8aeaaa Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sun, 14 Jul 2024 02:09:58 +0100 Subject: [PATCH] Only set GPG_TTY in a real TTY --- .bashrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 3be8590..81e91fe 100644 --- a/.bashrc +++ b/.bashrc @@ -146,5 +146,7 @@ unset rc if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env" fi -GPG_TTY=$(tty) -export GPG_TTY +if [ -t 0 ]; then + GPG_TTY=$(tty) + export GPG_TTY +fi;