From 92b0fef639916161a41ce9f1d5d961f420bf2c4e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 17 Apr 2024 13:46:28 +0100 Subject: [PATCH] Only specify shell=true on Windows Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- hak/keytar/build.ts | 2 +- scripts/hak/fetch.ts | 2 +- scripts/hak/link.ts | 4 ++-- scripts/set-version.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hak/keytar/build.ts b/hak/keytar/build.ts index 0920b76d..953ec710 100644 --- a/hak/keytar/build.ts +++ b/hak/keytar/build.ts @@ -32,7 +32,7 @@ export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: Dependency cwd: moduleInfo.moduleBuildDir, env, stdio: "inherit", - shell: true, + shell: hakEnv.isWin(), }, ); proc.on("exit", (code) => { diff --git a/scripts/hak/fetch.ts b/scripts/hak/fetch.ts index 84541c82..f7b0579b 100644 --- a/scripts/hak/fetch.ts +++ b/scripts/hak/fetch.ts @@ -44,7 +44,7 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo): const proc = childProcess.spawn(hakEnv.isWin() ? "yarn.cmd" : "yarn", ["install", "--ignore-scripts"], { stdio: "inherit", cwd: moduleInfo.moduleBuildDir, - shell: true, + shell: hakEnv.isWin(), }); proc.on("exit", (code) => { code ? reject(code) : resolve(); diff --git a/scripts/hak/link.ts b/scripts/hak/link.ts index abe0b015..77b6e893 100644 --- a/scripts/hak/link.ts +++ b/scripts/hak/link.ts @@ -53,7 +53,7 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): const proc = childProcess.spawn(yarnCmd, ["link"], { cwd: moduleInfo.moduleOutDir, stdio: "inherit", - shell: true, + shell: hakEnv.isWin(), }); proc.on("exit", (code) => { code ? reject(code) : resolve(); @@ -64,7 +64,7 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], { cwd: hakEnv.projectRoot, stdio: "inherit", - shell: true, + shell: hakEnv.isWin(), }); proc.on("exit", (code) => { code ? reject(code) : resolve(); diff --git a/scripts/set-version.ts b/scripts/set-version.ts index 8056e676..da8c4e8f 100755 --- a/scripts/set-version.ts +++ b/scripts/set-version.ts @@ -33,7 +33,7 @@ export async function setPackageVersion(ver: string): Promise { ver, ], { - shell: true, + shell: process.platform === "win32", }, (err) => { if (err) {