Skip to content

ci(release): pass the dry-run flag without word splitting - #559

Merged
cevdetch merged 1 commit into
mainfrom
ci/quote-dry-run
Nov 28, 2026
Merged

cevdetch merged 1 commit into
mainfrom
ci/quote-dry-run

Conversation

@cevdetch

Copy link
Copy Markdown
Owner

Problem

The publish step in release.yml passed $DRY_RUN unquoted, so the shell word-splits and glob-expands it (shellcheck SC2086). It works today only because the value is either empty or a single flag.

Change

  • Pass the flag as ${DRY_RUN:+"$DRY_RUN"}: no argument when empty, exactly one quoted argument when set.

Verification

  • actionlint -oneline .github/workflows/release.yml: clean.
  • zizmor --offline -q --min-severity medium .github/workflows/release.yml: clean.
  • Shell check of the expansion: empty DRY_RUN yields 0 extra arguments, DRY_RUN=--dry-run yields 1.

${DRY_RUN:+"$DRY_RUN"} adds --dry-run as one argument and nothing at all when it is empty, which is what the bare $DRY_RUN relied on splitting for. Clears shellcheck SC2086 under actionlint.
@cevdetch
cevdetch merged commit af717b4 into main Nov 28, 2026
8 checks passed
@cevdetch
cevdetch deleted the ci/quote-dry-run branch November 28, 2026 19:58
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.

1 participant