-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix unquoted shell variables according to ShellCheck #44
Conversation
This is just applying all the fixes suggested by https://www.shellcheck.net/. If you paste the old commands there (and optionally add a `#!/usr/bin/env bash` line at the beginning to get rid of the `Tips depend on target shell and yours is unknown.` message) and click one of the "apply all SC2086" links, you'll end up with the same changes. See https://github.com/koalaman/shellcheck/wiki/SC2086 for more details.
I think the most important fix is
For starters, this means that each group of consecutive whitespace characters (because by default jobs:
build:
name: Double space
steps:
- uses: Tiryoh/gha-jobid-action@v1
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: Double space Although the JOBINFO='{
"total_count": 1,
"jobs": [
{
"name": "Double space"
}
]
}'
( set -x; echo ${JOBINFO} ) Output:
Note that the double space between When
Fixing this bug might in theory solve #35 (comment) (we can't know for sure since @p0fi didn't provide much information to confirm or deny this), because it would match the symptoms mentioned by @p0fi:
|
Hi @generalmimon, Sorry to kept you waiting and thanks for your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @generalmimon!
This is just applying all the fixes suggested by https://www.shellcheck.net/. If you paste the old commands there (and optionally add a
#!/usr/bin/env bash
line at the beginning to get rid of theTips depend on target shell and yours is unknown.
message) and click one of the "apply all SC2086" links, you'll end up with the same changes.See https://github.com/koalaman/shellcheck/wiki/SC2086 for more details.