diff --git a/build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh b/build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh index 1b74498e5..05bb219a2 100755 --- a/build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh +++ b/build/deb_rpm/v2-jf/build-scripts/rpm-sign.sh @@ -29,8 +29,10 @@ rpmInitSigning(){ eval "$gpg_agent_output" # Set GPG_TTY if possible + local tty_value if tty -s; then - export GPG_TTY=$(tty) + tty_value=$(tty) + export GPG_TTY="$tty_value" else export GPG_TTY="/dev/null" fi diff --git a/build/deb_rpm/v2/build-scripts/rpm-sign.sh b/build/deb_rpm/v2/build-scripts/rpm-sign.sh index 1b74498e5..05bb219a2 100755 --- a/build/deb_rpm/v2/build-scripts/rpm-sign.sh +++ b/build/deb_rpm/v2/build-scripts/rpm-sign.sh @@ -29,8 +29,10 @@ rpmInitSigning(){ eval "$gpg_agent_output" # Set GPG_TTY if possible + local tty_value if tty -s; then - export GPG_TTY=$(tty) + tty_value=$(tty) + export GPG_TTY="$tty_value" else export GPG_TTY="/dev/null" fi