diff --git a/hak/keytar/build.ts b/hak/keytar/build.ts index 953ec710..31df28bc 100644 --- a/hak/keytar/build.ts +++ b/hak/keytar/build.ts @@ -32,6 +32,8 @@ export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: Dependency cwd: moduleInfo.moduleBuildDir, env, stdio: "inherit", + // We need shell mode on Windows to be able to launch `.cmd` executables + // See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 shell: hakEnv.isWin(), }, ); diff --git a/scripts/hak/fetch.ts b/scripts/hak/fetch.ts index f7b0579b..fa3a80c9 100644 --- a/scripts/hak/fetch.ts +++ b/scripts/hak/fetch.ts @@ -44,6 +44,8 @@ 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, + // We need shell mode on Windows to be able to launch `.cmd` executables + // See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 shell: hakEnv.isWin(), }); proc.on("exit", (code) => { diff --git a/scripts/hak/link.ts b/scripts/hak/link.ts index 77b6e893..c2613a9b 100644 --- a/scripts/hak/link.ts +++ b/scripts/hak/link.ts @@ -53,6 +53,8 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): const proc = childProcess.spawn(yarnCmd, ["link"], { cwd: moduleInfo.moduleOutDir, stdio: "inherit", + // We need shell mode on Windows to be able to launch `.cmd` executables + // See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 shell: hakEnv.isWin(), }); proc.on("exit", (code) => { @@ -64,6 +66,8 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], { cwd: hakEnv.projectRoot, stdio: "inherit", + // We need shell mode on Windows to be able to launch `.cmd` executables + // See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 shell: hakEnv.isWin(), }); proc.on("exit", (code) => { diff --git a/scripts/set-version.ts b/scripts/set-version.ts index da8c4e8f..3189a576 100755 --- a/scripts/set-version.ts +++ b/scripts/set-version.ts @@ -33,6 +33,8 @@ export async function setPackageVersion(ver: string): Promise { ver, ], { + // We need shell mode on Windows to be able to launch `.cmd` executables + // See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 shell: process.platform === "win32", }, (err) => {