fix: run setup steps as separate tasks so Windows PowerShell works - #15
Merged
Conversation
The bootstrap install ran `npm install -g <pkg> && pi install <src>` as a single ShellExecution. Windows PowerShell 5.1 — still the default shell on many Windows machines — rejects `&&` as a statement separator, so the auto-install failed before installing anything. The pi-package migration path had the same problem (`pi remove X && pi install Y`). No separator works across cmd, PowerShell and POSIX shells, so run each command as its own task instead, short-circuiting on the first non-zero exit to preserve && semantics. Tasks share a name to reuse one terminal panel; only the first clears so a multi-step run reads as one log. Untested on Windows itself: the bootstrap path is skipped under the UI test harness (CHRONOS_SKIP_BOOTSTRAP=1).
Ships the Windows PowerShell fix for the bootstrap installer: running `npm install -g <pkg> && pi install <src>` as a single ShellExecution failed on Windows PowerShell 5.1, which rejects && as a statement separator, so the auto-install never ran.
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.
The bootstrap install ran
npm install -g <pkg> && pi install <src>as a singleShellExecution. Windows PowerShell 5.1 — still the default shell on many Windows machines — rejects&&as a statement separator, so the auto-install failed before installing anything. The pi-package migration path had the same problem (pi remove X && pi install Y).No separator works across cmd, PowerShell and POSIX shells, so each command now runs as its own task, short-circuiting on the first non-zero exit to preserve
&&semantics. Tasks share a name to reuse one terminal panel; only the first clears, so a multi-step run reads as one log.Why not the alternatives
&&for;— works in PowerShell, not in cmd.cmd.exeviaShellExecutionOptions— pins a shell and loses the user's login-shell PATH setup.Verification
npx tsc --noEmit -p tsconfig.json— cleannpm run build— cleannode test/run-ui-test.mjs— 18/18 PASSNot verified
The bootstrap path is skipped under the test harness (
CHRONOS_SKIP_BOOTSTRAP=1) and I have no Windows machine, so the PowerShell 5.1 failure itself is untested end-to-end. Someone on Windows should confirm the auto-install completes before this is cut into a release.