Skip to content
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 shellcheck issues in workflows #176544

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Fix shellcheck issues in workflows #176544

merged 1 commit into from
Jun 12, 2024

Conversation

samford
Copy link
Member

@samford samford commented Jun 12, 2024

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • Checked the cask is submitted to the correct repo.
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

shellcheck is reporting an SC2086 ("Double quote to prevent globbing and word splitting") issue in the bump-unversioned-casks.yml workflow and SC2016 ("Expressions don't expand in single quotes, use double quotes for that") issues in the ci.yml workflow.

The SC2016 issues seem to appear because the use of backticks around the cask names (markdown syntax) can be interpreted as legacy backticks (as used in shell code). The only way I could appease shellcheck was to use double quotes and escape the backticks.

This passes brew style but I haven't tested it, so hopefully it works as intended. Please check my work, feel free to revert if anything breaks, etc.

Related to Homebrew/brew#17482

`shellcheck` is reporting an SC2086 ("Double quote to prevent
globbing and word splitting") issue in the
`bump-unversioned-casks.yml` workflow and SC2016 ("Expressions don't
expand in single quotes, use double quotes for that") issues in the
`ci.yml` workflow.

The SC2016 issues seem to appear because the use of backticks around
the cask names (markdown syntax) can be interpreted as legacy
backticks (as used in shell code). The only way I could appease
`shellcheck` was to use double quotes and escape the backticks.

This passes `brew style` but I haven't tested it, so hopefully it
works as intended.
@samford samford force-pushed the brew-style-shellcheck-fixes branch from 0aa4c6c to d1c3034 Compare June 12, 2024 20:30
@miccal miccal merged commit 8ac64f2 into master Jun 12, 2024
8 checks passed
@miccal miccal deleted the brew-style-shellcheck-fixes branch June 12, 2024 20:43
@miccal
Copy link
Member

miccal commented Jun 12, 2024

Thanks @samford -- I manually ran our autobump workflow to test, and all seems fine.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants