From 1d9a8b41346bc556cfdb9bbc2a640faf47ded4c6 Mon Sep 17 00:00:00 2001 From: Dariush Alipour Date: Tue, 30 Jul 2024 01:36:46 +0200 Subject: [PATCH] fix: child_process test with specified shell for windows (#12926) --- test/js/node/child_process/child_process.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/js/node/child_process/child_process.test.ts b/test/js/node/child_process/child_process.test.ts index a124c6f64c..f2ecb17f7a 100644 --- a/test/js/node/child_process/child_process.test.ts +++ b/test/js/node/child_process/child_process.test.ts @@ -223,7 +223,7 @@ describe("spawn()", () => { it("should allow us to spawn in the default shell", async () => { const shellPath: string = await new Promise(resolve => { - const child = spawn("echo", [isWindows ? "$env:SHELL" : "$SHELL"], { shell: true }); + const child = spawn("echo", [isWindows ? "$PSHOME" : "$SHELL"], { shell: true }); child.stdout.on("data", data => { resolve(data.toString().trim()); }); @@ -240,7 +240,7 @@ describe("spawn()", () => { it("should allow us to spawn in a specified shell", async () => { const shell = shellExe(); const shellPath: string = await new Promise(resolve => { - const child = spawn("echo", [isWindows ? "$env:SHELL" : "$SHELL"], { shell }); + const child = spawn("echo", [isWindows ? "$PSHOME" : "$SHELL"], { shell }); child.stdout.on("data", data => { resolve(data.toString().trim()); });