Summary
On Windows PowerShell, the rewritten command includes a bash-style pipeline exit expression. This leads to:
- PowerShell parse/runtime error for the exit expression.
- Incorrect command status handling in hook-managed execution.
Environment
VSCode with GitHub Copilot on Windows 11
Observed behavior
The wrapped command tail includes a suffix equivalent to:
... | boost; (exit ${PIPESTATUS[0]:-$pipestatus[1]})
In PowerShell, this syntax is not valid.
Expected behavior
- Windows PowerShell wrappers should be PowerShell-native.
- Exit status should match the pre-pipe command exit (
PIPESTATUS[0] intent), not the post-pipe tool exit.
Impact
- False-negative command failures in agent/tooling flows.
- Broken automation and noisy diagnostics.
- Ambiguous success/failure outcomes.
Minimal repro (anonymized)
- Enable hook integration in a Windows PowerShell environment.
- Run a simple command through the rewritten wrapper.
- Observe parse error or incorrect non-zero behavior tied to the wrapper tail expression.
Proposed fix
- Do not emit bash
PIPESTATUS syntax for PowerShell targets.
- For PowerShell wrappers, preserve pre-pipe exit by capturing
$LASTEXITCODE before piping:
- run original command
- capture
$LASTEXITCODE into a variable
- pipe output to
boost
exit with captured variable
- Keep shell-specific rewrite logic separated by target shell.
Acceptance criteria
- No PowerShell parse/runtime error in wrapped commands.
- Success path returns success when original command succeeds.
- Failure path returns original command failure code even when piped through
boost.
- Behavior consistent across Windows PowerShell 5.1 and PowerShell 7+.
Privacy note
This report intentionally excludes repository names, user paths, hostnames, tokens, and proprietary command content.
Summary
On Windows PowerShell, the rewritten command includes a bash-style pipeline exit expression. This leads to:
Environment
VSCode with GitHub Copilot on Windows 11
Observed behavior
The wrapped command tail includes a suffix equivalent to:
In PowerShell, this syntax is not valid.
Expected behavior
PIPESTATUS[0]intent), not the post-pipe tool exit.Impact
Minimal repro (anonymized)
Proposed fix
PIPESTATUSsyntax for PowerShell targets.$LASTEXITCODEbefore piping:$LASTEXITCODEinto a variableboostexitwith captured variableAcceptance criteria
boost.Privacy note
This report intentionally excludes repository names, user paths, hostnames, tokens, and proprietary command content.