Skip to content

Commit 313c75d

Browse files
committed
Avoid using /dev/stderr as it results in null characters being output
No idea why. Anyway, this works better.
1 parent 2d53338 commit 313c75d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function gpg_import() {
117117
local privateKeyPath="$1"
118118
shift
119119
local keyId
120-
keyId=$(gpg "${@}" --batch --import "$privateKeyPath" 2>&1 | tee /dev/stderr | grep 'key.*: secret key imported' | sed -E 's/.*key ([^:]+):.*/\1/')
120+
keyId=$(gpg "${@}" --batch --import "$privateKeyPath" 2>&1 | tee >(cat 1>&2) | grep 'key.*: secret key imported' | sed -E 's/.*key ([^:]+):.*/\1/')
121121
# output the fingerprint of the imported key
122122
gpg "${@}" --list-secret-keys --with-colon "$keyId" | sed -E '2!d;s/.*:([^:]+):$/\1/'
123123
}

0 commit comments

Comments
 (0)