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,7 +39,9 @@ export function setupChocolatey(
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe
|
// https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe
|
||||||
execa.sync(powershell, [
|
execa.sync(
|
||||||
|
powershell,
|
||||||
|
[
|
||||||
"-NoProfile",
|
"-NoProfile",
|
||||||
"-InputFormat",
|
"-InputFormat",
|
||||||
"None",
|
"None",
|
||||||
|
@ -47,7 +49,9 @@ export function setupChocolatey(
|
||||||
"Bypass",
|
"Bypass",
|
||||||
"-Command",
|
"-Command",
|
||||||
"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))",
|
"[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`
|
const chocoPath = `${process.env.ALLUSERSPROFILE}\\chocolatey\\bin`
|
||||||
addPath(chocoPath)
|
addPath(chocoPath)
|
||||||
|
|
|
@ -34,8 +34,8 @@ function getKcovPackageInfo(version: string): PackageInfo {
|
||||||
// await setupCmake("3.22.0", join(untildify(""), "cmake"), "")
|
// await setupCmake("3.22.0", join(untildify(""), "cmake"), "")
|
||||||
await setupAptPack("libdw-dev")
|
await setupAptPack("libdw-dev")
|
||||||
await setupAptPack("libcurl4-openssl-dev")
|
await setupAptPack("libcurl4-openssl-dev")
|
||||||
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out })
|
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
|
||||||
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out })
|
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
|
||||||
await execSudo("cmake", ["--install", "./build"], out)
|
await execSudo("cmake", ["--install", "./build"], out)
|
||||||
return out
|
return out
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,5 +18,5 @@ export function execPowershell(command: string) {
|
||||||
throw new Error("Could not find powershell")
|
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",
|
stdio: "inherit",
|
||||||
})
|
})
|
||||||
} else {
|
} 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"
|
sevenZip = "7z"
|
||||||
}
|
}
|
||||||
|
|
||||||
await execa(sevenZip, ["x", file, `-o${dest}`])
|
await execa(sevenZip, ["x", file, `-o${dest}`], { stdio: "inherit" })
|
||||||
return dest
|
return dest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,6 @@ export async function extractTarByExe(file: string, dest: string, flags = ["--st
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
await execa("tar", ["xf", file, "-C", dest, ...flags])
|
await execa("tar", ["xf", file, "-C", dest, ...flags], { stdio: "inherit" })
|
||||||
return dest
|
return dest
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
|
||||||
}
|
}
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
|
// 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], {
|
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")))) {
|
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 {
|
} else {
|
||||||
warning(`Vcpkg folder already exists at ${setupDir}`)
|
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)
|
addPath(setupDir)
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
hasVCPKG = true
|
hasVCPKG = true
|
||||||
|
|
Loading…
Reference in New Issue