Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change how we pass passphrase to gnupg, for #781 #783

Merged
merged 2 commits into from
Mar 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/_utils/_git_secret_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ function _decrypt {
#echo "# gpg passphrase: $passphrase" >&3
local exit_code
if [[ -n "$passphrase" ]]; then
echo "$passphrase" | $SECRETS_GPG_COMMAND "${args[@]}" --batch --yes --no-tty --passphrase-fd 0 \
"$encrypted_filename"
exec 4<<<"$passphrase" # use 4, because descriptor 3 is used by bats
$SECRETS_GPG_COMMAND "${args[@]}" --batch --yes --no-tty --passphrase-fd 4 "$encrypted_filename"
exit_code=$?
else
$SECRETS_GPG_COMMAND "${args[@]}" "$encrypted_filename"
Expand Down