From d59eaf5f1f1fb8d8d9c1dbbb20049749bc76653b Mon Sep 17 00:00:00 2001 From: Jared Allard Date: Tue, 23 May 2023 14:40:08 -0700 Subject: [PATCH] fix(e2e): use correct gpg dearmor command (#546) When operating on a file, `gpg --dearmor` will write the output to another file on disk. However, if you pipe the file it will write to stdout. I tested this while piping, so this broke once I released it. Instead we now tell gpg to always output to stdout using `--output -`. I've tested the entire function in CI now, so I'm confident this works. --- shell/ci/testing/setup-devenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/ci/testing/setup-devenv.sh b/shell/ci/testing/setup-devenv.sh index 79d0a1a6..f812c40b 100755 --- a/shell/ci/testing/setup-devenv.sh +++ b/shell/ci/testing/setup-devenv.sh @@ -39,7 +39,7 @@ if [[ -n $CI ]]; then # they end up fixing it. if grep -q -- "-----BEGIN" "$tmpFile"; then # Output is armored, convert to binary - gpg --dearmor "$tmpFile" | sudo tee "$keyringLocation" >/dev/null + gpg --output - --dearmor "$tmpFile" | sudo tee "$keyringLocation" >/dev/null rm "$tmpFile" else echo "Warning: GCP apt-key is not armored. We can remove this workaround now."