Repository navigation
fix(wrap): wrap runs on bash 3.2 again, parse and run check - #1262
Merged
Merged
Conversation
Fixes bash 3.2 parse and runtime regressions in wrap-session.sh and report-lint.sh: - Remove unmatched apostrophes and backticks from comments inside command substitutions in _session_transcript_json (bash 3.2 parse_comsub tracked them as quotes, causing a syntax error at line 740). - Use POSIX balanced parentheses on case clauses inside the acted command substitution. - Move the multi-line jq program in _session_summary_text into a quoted heredoc variable and add a shellcheck dialect header. - Guard empty built_items array expansion in report-lint.sh under set -u for bash 3.2. - Add always-on tests/test-bash32-parse.sh to run /bin/bash -n over every shipped shell file on macOS (skips when /bin/bash is not 3.2) so the fast PR lane catches 3.2 parse errors.
Stage 1 (/bin/bash -n) cannot parse command substitutions inside double quotes or catch runtime empty-array errors under set -u. Stage 2 now runs bin/wrap session --json/--summary with a transcript fixture and lib/wrap/report-lint.sh on an empty built list under /bin/bash 3.2 (with bash shimmed to /bin/bash first on PATH) and asserts real output and clean stderr, and prints a clear RUNNING or SKIP status line.
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.
What
Wrap from PR 1257 failed on macOS /bin/bash 3.2, the shell the kit supports.
CI missed it because the macOS jobs put Homebrew bash 5 first on PATH.
Demo
/bin/bash -n lib/wrap/wrap-session.sh: syntax error before, clean after.Proof
docs/verification/l312-bash32-hotfix.md
Bookkeeping
no-board-row: regression fix tracked on the devkit leftovers item