Only specify shell=true on Windows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-04-17 13:46:28 +01:00
parent bc10fb7f85
commit 92b0fef639
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
4 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: Dependency
cwd: moduleInfo.moduleBuildDir, cwd: moduleInfo.moduleBuildDir,
env, env,
stdio: "inherit", stdio: "inherit",
shell: true, shell: hakEnv.isWin(),
}, },
); );
proc.on("exit", (code) => { proc.on("exit", (code) => {

View File

@ -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"], { const proc = childProcess.spawn(hakEnv.isWin() ? "yarn.cmd" : "yarn", ["install", "--ignore-scripts"], {
stdio: "inherit", stdio: "inherit",
cwd: moduleInfo.moduleBuildDir, cwd: moduleInfo.moduleBuildDir,
shell: true, shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {
code ? reject(code) : resolve(); code ? reject(code) : resolve();

View File

@ -53,7 +53,7 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
const proc = childProcess.spawn(yarnCmd, ["link"], { const proc = childProcess.spawn(yarnCmd, ["link"], {
cwd: moduleInfo.moduleOutDir, cwd: moduleInfo.moduleOutDir,
stdio: "inherit", stdio: "inherit",
shell: true, shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {
code ? reject(code) : resolve(); 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], { const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], {
cwd: hakEnv.projectRoot, cwd: hakEnv.projectRoot,
stdio: "inherit", stdio: "inherit",
shell: true, shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {
code ? reject(code) : resolve(); code ? reject(code) : resolve();

View File

@ -33,7 +33,7 @@ export async function setPackageVersion(ver: string): Promise<void> {
ver, ver,
], ],
{ {
shell: true, shell: process.platform === "win32",
}, },
(err) => { (err) => {
if (err) { if (err) {