10000 fix: use /usr/bin/env bash shebang by AlexanderBrevig · Pull Request #27 · github/gh-codeql · GitHub
[go: up one dir, main page]

Skip to content

fix: use /usr/bin/env bash shebang #27

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

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

AlexanderBrevig
Copy link
Contributor

Closes #26

You now gain the freedom of having bash where you please, as long as your env can find it 👍🏻

@AlexanderBrevig AlexanderBrevig requested a review from a team as a code owner March 22, 2024 18:22
aeisenberg
aeisenberg previously approved these changes Mar 22, 2024
Copy link
Contributor
@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@AlexanderBrevig
Copy link
Contributor Author

Thanks for the fix!

Thank you for the super-quick review!
I cannot figure out why but the PR Checks seems to get a pipefile in the evaluation of

gh api "repos/dsp-testing/codeql-cli-nightlies/releases" \
  --jq '.[] | select(.draft == false) | .body ' \
  | head -n 1 \
  | awk '{print $4}'

Which I find weird as it works here to

v2.17.0+202403212104

@aeisenberg
Copy link
Contributor

Same. I was hoping it was a temporary error.

@AlexanderBrevig
Copy link
Contributor Author

I added the fix for the pipefail. It seems head closes the pipe immediatly after it gets the first line. While testing locally I did not run my bash in pipefail mode, but it seems GitHub does this by default.

This was surprisingly hard to figure out, maybe GitHub could more clearly state the mode of operation / flags passed to bash?

Ready for review again @aeisenberg 👍🏻

Copy link
Contributor
@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's amazing. Thanks for fixing this. I spent a few hours trying to figure out the problem, and had given up.

@aeisenberg aeisenberg merged commit 5559955 into github:main Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow bash to not be at /bin/bash
2 participants
0