Skip to content

Commit e19bdb7

Browse files
branchseerclaude
andcommitted
fix: use PowerShell for Windows e2e tests
cmd.exe doesn't handle quoted arguments with embedded equals signs and brackets correctly. PowerShell has much better argument parsing that matches Unix shell behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b6bafd2 commit e19bdb7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • crates/vite_task_bin/tests/test_snapshots

crates/vite_task_bin/tests/test_snapshots/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ fn run_case(runtime: &Runtime, tmpdir: &AbsolutePath, fixture_path: &Path) {
173173
let mut e2e_outputs = String::new();
174174
for step in e2e.steps {
175175
let mut cmd = if cfg!(windows) {
176-
let mut cmd = Command::new("cmd.exe");
177-
// https://github.com/nodejs/node/blob/dbd24b165128affb7468ca42f69edaf7e0d85a9a/lib/child_process.js#L633
178-
cmd.args(["/d", "/s", "/c"]);
176+
// Use PowerShell on Windows for better argument handling
177+
let mut cmd = Command::new("powershell.exe");
178+
cmd.args(["-NoProfile", "-NonInteractive", "-Command"]);
179179
cmd
180180
} else {
181181
let mut cmd = Command::new("sh");

0 commit comments

Comments
 (0)