fix(hack): guard empty-array expansion in lint-drift.sh for bash 3.2 - #159
Open
omergk28 wants to merge 1 commit into
Open
fix(hack): guard empty-array expansion in lint-drift.sh for bash 3.2#159omergk28 wants to merge 1 commit into
omergk28 wants to merge 1 commit into
Conversation
omergk28
force-pushed
the
fix/hack-script-portability
branch
from
August 20, 2026 02:31
e9279d8 to
35c9cc6
Compare
lint-drift.sh aborted with "exclude_args[@]: unbound variable" under
set -u on stock macOS /bin/bash 3.2, which treats expanding an empty
array as an unset-variable error (legal since bash 4.4). make audit
could not run at all on a default macOS toolchain. Behavior-preserving
${arr[@]+"${arr[@]}"} guard; findings identical under GNU.
The sibling lint-docstrings.sh portability bugs were fixed upstream
(specs/lint-docstrings-macos-portability.md, PR ActiveMemory#163); this branch
now carries only the lint-drift fix.
Spec: specs/hack-script-portability.md
Signed-off-by: Omer Kocaoglu <omergk28@gmail.com>
omergk28
force-pushed
the
fix/hack-script-portability
branch
from
August 28, 2026 16:26
35c9cc6 to
e6a875c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(hack): guard empty-array expansion in lint-drift.sh for bash 3.2
Branch:
fix/hack-script-portability→mainCommits:
e6a875cd· Spec:specs/hack-script-portability.mdWhat
make auditcould not run at all on a default macOS toolchain:hack/lint-drift.sh"${arr[@]}"aborts underset -u(bash 3.2: "unbound variable"; legal since bash 4.4)${arr[@]+"${arr[@]}"}guardVerification
make auditcompletes green on macOS with identical findings to aGNU toolchain (
lint-drift: clean).shellcheckclean.Notes
isolated-PR rule.
tracked in TASKS.md; this only unblocks the gate.
🤖 Generated with Claude Code