Revert "fix: fix cross-spawn exit codes"

This reverts commit 1a81d4edde.
This commit is contained in:
Amin Yahyaabadi 2021-09-17 15:19:32 -05:00
parent 03dfa71def
commit b61c16aa45
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ export function setupAptPack(name: string, version?: string, repository: boolean
exit = spawn.sync(apt, ["install", "-y", name], { stdio: "inherit" }).status exit = spawn.sync(apt, ["install", "-y", name], { stdio: "inherit" }).status
} }
if (exit !== 0 && exit !== null) { if (exit !== 0) {
throw new Error(`Failed to install ${name} ${version}`) throw new Error(`Failed to install ${name} ${version}`)
} }

View File

@ -21,7 +21,7 @@ export async function setupChocoPack(name: string, version?: string, args: strin
exit = spawn.sync("choco", ["install", "-y", name, ...args], { stdio: "inherit" }).status exit = spawn.sync("choco", ["install", "-y", name, ...args], { stdio: "inherit" }).status
} }
if (exit !== 0 && exit !== null) { if (exit !== 0) {
throw new Error(`Failed to install ${name} ${version}`) throw new Error(`Failed to install ${name} ${version}`)
} }

View File

@ -28,7 +28,7 @@ export async function setupPipPack(name: string, version?: string) {
const exit = spawn.sync(pip, ["install", version !== undefined && version !== "" ? `${name}==${version}` : name], { const exit = spawn.sync(pip, ["install", version !== undefined && version !== "" ? `${name}==${version}` : name], {
stdio: "inherit", stdio: "inherit",
}).status }).status
if (exit !== 0 && exit !== null) { if (exit !== 0) {
throw new Error(`Failed to install ${name} ${version}`) throw new Error(`Failed to install ${name} ${version}`)
} }