mirror of https://github.com/aminya/setup-cpp
fix: use stdio inherit for execa.sync brew and apt
This commit is contained in:
parent
6d9651573c
commit
d7ccf0506b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,11 @@ import { isRoot } from "../env/sudo"
|
||||||
|
|
||||||
export function execSudo(file: string, args: string[], cwd?: string) {
|
export function execSudo(file: string, args: string[], cwd?: string) {
|
||||||
if (isRoot()) {
|
if (isRoot()) {
|
||||||
return execa.command(`sudo ${[file, ...args].map((arg) => `'${arg}'`).join(" ")}`, { shell: true, cwd })
|
return execa.command(`sudo ${[file, ...args].map((arg) => `'${arg}'`).join(" ")}`, {
|
||||||
|
shell: true,
|
||||||
|
cwd,
|
||||||
|
stdio: "inherit",
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return execa(file, args)
|
return execa(file, args)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,9 @@ export function setupBrewPack(name: string, version?: string): InstallationInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
// brew is not thread-safe
|
// brew is not thread-safe
|
||||||
execa.sync("brew", ["install", version !== undefined && version !== "" ? `${name}@${version}` : name])
|
execa.sync("brew", ["install", version !== undefined && version !== "" ? `${name}@${version}` : name], {
|
||||||
|
stdio: "inherit",
|
||||||
|
})
|
||||||
|
|
||||||
return { binDir: "/usr/local/bin/" }
|
return { binDir: "/usr/local/bin/" }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue