Skip to content

fix(rust-debian): split offline cargo args without tripping SC2086#74

Merged
Jaro-c merged 1 commit into
mainfrom
fix/rust-debian-sc2086
Jun 29, 2026
Merged

fix(rust-debian): split offline cargo args without tripping SC2086#74
Jaro-c merged 1 commit into
mainfrom
fix/rust-debian-sc2086

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 29, 2026

Copy link
Copy Markdown
Member

What

The rust-debian reusable workflow's offline build step split the extra cargo args with set -- $OFFLINE_ARGS — an unquoted expansion. shellcheck flags that as SC2086, and since the Actionlint job runs shellcheck over every run: block, the whole CI went red on each push to main and on unrelated PRs.

Fix

Both jobs already default to shell: bash (from #72), so I read the args into a bash array and expand it quoted:

read -ra offline_args <<< "$OFFLINE_ARGS"
cargo build --release --locked --offline "${offline_args[@]}"

Same intentional word-splitting, no accidental globbing, and shellcheck/Actionlint pass.

Compatibility

No input contract change — offline-cargo-args/OFFLINE_ARGS are untouched, so callers need no changes. The only consumer (Glyndor/podup) pins an older commit and passes plain feature flags, which split identically. The default image debian:trixie ships bash, so the herestring is safe.

The offline build step used `set -- $OFFLINE_ARGS` with an unquoted
expansion, which shellcheck flags as SC2086 and fails the Actionlint
gate. Both jobs already default to bash, so read the args into a bash
array and expand it quoted instead: same word-splitting, no globbing,
and the linter passes.

Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
@Jaro-c
Jaro-c merged commit fae8db7 into main Jun 29, 2026
3 checks passed
@Jaro-c
Jaro-c deleted the fix/rust-debian-sc2086 branch June 29, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant