Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Avoid using /dev/stderr as it results in null characters being output
Browse files Browse the repository at this point in the history
No idea why. Anyway, this works better.
  • Loading branch information
Hibernate-CI committed Sep 4, 2023
1 parent 2d53338 commit 313c75d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function gpg_import() {
local privateKeyPath="$1"
shift
local keyId
keyId=$(gpg "${@}" --batch --import "$privateKeyPath" 2>&1 | tee /dev/stderr | grep 'key.*: secret key imported' | sed -E 's/.*key ([^:]+):.*/\1/')
keyId=$(gpg "${@}" --batch --import "$privateKeyPath" 2>&1 | tee >(cat 1>&2) | grep 'key.*: secret key imported' | sed -E 's/.*key ([^:]+):.*/\1/')
# output the fingerprint of the imported key
gpg "${@}" --list-secret-keys --with-colon "$keyId" | sed -E '2!d;s/.*:([^:]+):$/\1/'
}
Expand Down

0 comments on commit 313c75d

Please sign in to comment.