mirror of https://github.com/aminya/setup-cpp
fix: set stdio: inherit for all exec calls
This commit is contained in:
parent
e6efc4aca9
commit
4b250a3ca2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -39,15 +39,19 @@ export function setupChocolatey(
|
|||
}
|
||||
|
||||
// https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe
|
||||
execa.sync(powershell, [
|
||||
"-NoProfile",
|
||||
"-InputFormat",
|
||||
"None",
|
||||
"-ExecutionPolicy",
|
||||
"Bypass",
|
||||
"-Command",
|
||||
"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))",
|
||||
])
|
||||
execa.sync(
|
||||
powershell,
|
||||
[
|
||||
"-NoProfile",
|
||||
"-InputFormat",
|
||||
"None",
|
||||
"-ExecutionPolicy",
|
||||
"Bypass",
|
||||
"-Command",
|
||||
"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))",
|
||||
],
|
||||
{ stdio: "inherit" }
|
||||
)
|
||||
|
||||
const chocoPath = `${process.env.ALLUSERSPROFILE}\\chocolatey\\bin`
|
||||
addPath(chocoPath)
|
||||
|
|
|
@ -34,8 +34,8 @@ function getKcovPackageInfo(version: string): PackageInfo {
|
|||
// await setupCmake("3.22.0", join(untildify(""), "cmake"), "")
|
||||
await setupAptPack("libdw-dev")
|
||||
await setupAptPack("libcurl4-openssl-dev")
|
||||
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out })
|
||||
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out })
|
||||
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
|
||||
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
|
||||
await execSudo("cmake", ["--install", "./build"], out)
|
||||
return out
|
||||
},
|
||||
|
|
|
@ -18,5 +18,5 @@ export function execPowershell(command: string) {
|
|||
throw new Error("Could not find powershell")
|
||||
}
|
||||
|
||||
execa.sync(powershell, ["-c", command])
|
||||
execa.sync(powershell, ["-c", command], { stdio: "inherit" })
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@ export function execSudo(file: string, args: string[], cwd?: string) {
|
|||
stdio: "inherit",
|
||||
})
|
||||
} else {
|
||||
return execa(file, args)
|
||||
return execa(file, args, { stdio: "inherit" })
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export async function extractExe(file: string, dest: string) {
|
|||
sevenZip = "7z"
|
||||
}
|
||||
|
||||
await execa(sevenZip, ["x", file, `-o${dest}`])
|
||||
await execa(sevenZip, ["x", file, `-o${dest}`], { stdio: "inherit" })
|
||||
return dest
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,6 @@ export async function extractTarByExe(file: string, dest: string, flags = ["--st
|
|||
} catch {
|
||||
// ignore
|
||||
}
|
||||
await execa("tar", ["xf", file, "-C", dest, ...flags])
|
||||
await execa("tar", ["xf", file, "-C", dest, ...flags], { stdio: "inherit" })
|
||||
return dest
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
|
|||
}
|
||||
if (process.platform === "win32") {
|
||||
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
|
||||
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"])
|
||||
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" })
|
||||
}
|
||||
|
||||
execa.sync(python, ["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name], {
|
||||
|
|
|
@ -23,12 +23,12 @@ export async function setupVcpkg(_version: string, setupDir: string, _arch: stri
|
|||
}
|
||||
|
||||
if (!existsSync(join(setupDir, addShellExtension("bootstrap-vcpkg")))) {
|
||||
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
|
||||
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir), stdio: "inherit" })
|
||||
} else {
|
||||
warning(`Vcpkg folder already exists at ${setupDir}`)
|
||||
}
|
||||
|
||||
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true })
|
||||
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true, stdio: "inherit" })
|
||||
addPath(setupDir)
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
hasVCPKG = true
|
||||
|
|
Loading…
Reference in New Issue