8000 fix: use sed and not head, head closes pipe · github/gh-codeql@de7ae46 · GitHub
[go: up one dir, main page]

Skip to content

Commit de7ae46

Browse files
fix: use sed and not head, head closes pipe
1 parent 46df100 commit de7ae46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ jobs:
204204
205205
# unfortunately for nightly builds the tag name does not match with the version name
206206
# (as it does for releases). So, we need to download by tag name and then check the version name.
207-
LATEST_NIGHTLY_TAG="$(gh api "repos/dsp-testing/codeql-cli-nightlies/releases" --jq ".[] | select(.draft == false) | .tag_name" | head -1)"
207+
LATEST_NIGHTLY_TAG="$(gh api "repos/dsp-testing/codeql-cli-nightlies/releases" --jq ".[] | select(.draft == false) | .tag_name" | sed '1!d')"
208208
209209
# slightly hacky way of getting the version. Hopefully, we don't change how we format the release body.
210-
LATEST_NIGHTLY_VERSION="$(gh api "repos/dsp-testing/codeql-cli-nightlies/releases" --jq '.[] | select(.draft == false) | .body '| head -n 1 | awk '{print $4}')"
210+
LATEST_NIGHTLY_VERSION="$(gh api "repos/dsp-testing/codeql-cli-nightlies/releases" --jq '.[] | select(.draft == false) | .body '| sed '1!d' | awk '{print $4}')"
211211
echo "Download nightly version $LATEST_NIGHTLY_VERSION and tag $LATEST_NIGHTLY_TAG"
212212
213213
gh codeql set-channel nightly

0 commit comments

Comments
 (0)
0