You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
safe-bash: malformed parameter expansion in legacy backticks fails at outer parse time #703
Malformed parameter expansion inside a closed legacy-backtick substitution is currently rejected while parsing the outer script, although Bash accepts the script and reports the failure when the child substitution evaluates that word.
Current behavior: parseShell throws ShellSyntaxError: Unterminated or unsupported parameter expansion; Shell.exec exits 2 and the outer script does not continue.
GNU Bash 5.2.37 accepts the syntax. The malformed expansion fails inside the substitution with status 1, and the outer script continues:
BEFORE
STATUS:1 VALUE:<>
AFTER
The trace-shell compatibility RED reproduced the eager parser failure and outer exit-code mismatch on both MemoryFS and mock S3. The authenticated native fixture is 128 bytes with SHA-256 c01b8b24949870d3f5232ab547b0889f5386a1eea276e98c2e9d6fc52cecc084.
The fix should preserve the malformed expansion as a narrowly scoped runtime failure only within a closed ordinary backtick. Prior child output and effects should remain, later child work should stop, lazy branches/functions/default alternates should remain lazy, and the child status should flow through normal substitution capture. Keep top-level input, $(), process substitution, heredocs, unclosed backticks, array/special/numeric forms, depth limits, and cancellation behavior unchanged. Add paired MemoryFS/mock-S3 regression coverage.
A pending local candidate passes the focused compatibility checks but is not on origin/main or released.
Activity
fix(safe-bash): defer malformed backtick parameter failures
test(safe-js): bound spread regression worker stack