mirror of https://github.com/aminya/setup-cpp
Revert "fix: fix cross-spawn exit codes"
This reverts commit 1a81d4edde
.
This commit is contained in:
parent
03dfa71def
commit
b61c16aa45
|
@ -30,7 +30,7 @@ export function setupAptPack(name: string, version?: string, repository: boolean
|
|||
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}`)
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
if (exit !== 0 && exit !== null) {
|
||||
if (exit !== 0) {
|
||||
throw new Error(`Failed to install ${name} ${version}`)
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export async function setupPipPack(name: string, version?: string) {
|
|||
const exit = spawn.sync(pip, ["install", version !== undefined && version !== "" ? `${name}==${version}` : name], {
|
||||
stdio: "inherit",
|
||||
}).status
|
||||
if (exit !== 0 && exit !== null) {
|
||||
if (exit !== 0) {
|
||||
throw new Error(`Failed to install ${name} ${version}`)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue