Skip to content

Commit 4b250a3

Browse files
committed
fix: set stdio: inherit for all exec calls
1 parent e6efc4a commit 4b250a3

File tree

9 files changed

+24
-20
lines changed

9 files changed

+24
-20
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/chocolatey/chocolatey.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ export function setupChocolatey(
3939
}
4040

4141
// https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe
42-
execa.sync(powershell, [
43-
"-NoProfile",
44-
"-InputFormat",
45-
"None",
46-
"-ExecutionPolicy",
47-
"Bypass",
48-
"-Command",
49-
"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))",
50-
])
42+
execa.sync(
43+
powershell,
44+
[
45+
"-NoProfile",
46+
"-InputFormat",
47+
"None",
48+
"-ExecutionPolicy",
49+
"Bypass",
50+
"-Command",
51+
"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))",
52+
],
53+
{ stdio: "inherit" }
54+
)
5155

5256
const chocoPath = `${process.env.ALLUSERSPROFILE}\\chocolatey\\bin`
5357
addPath(chocoPath)

src/kcov/kcov.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function getKcovPackageInfo(version: string): PackageInfo {
3434
// await setupCmake("3.22.0", join(untildify(""), "cmake"), "")
3535
await setupAptPack("libdw-dev")
3636
await setupAptPack("libcurl4-openssl-dev")
37-
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out })
38-
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out })
37+
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
38+
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
3939
await execSudo("cmake", ["--install", "./build"], out)
4040
return out
4141
},

src/utils/exec/powershell.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export function execPowershell(command: string) {
1818
throw new Error("Could not find powershell")
1919
}
2020

21-
execa.sync(powershell, ["-c", command])
21+
execa.sync(powershell, ["-c", command], { stdio: "inherit" })
2222
}

src/utils/exec/sudo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export function execSudo(file: string, args: string[], cwd?: string) {
99
stdio: "inherit",
1010
})
1111
} else {
12-
return execa(file, args)
12+
return execa(file, args, { stdio: "inherit" })
1313
}
1414
}

src/utils/setup/extract.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export async function extractExe(file: string, dest: string) {
1616
sevenZip = "7z"
1717
}
1818

19-
await execa(sevenZip, ["x", file, `-o${dest}`])
19+
await execa(sevenZip, ["x", file, `-o${dest}`], { stdio: "inherit" })
2020
return dest
2121
}
2222

@@ -26,6 +26,6 @@ export async function extractTarByExe(file: string, dest: string, flags = ["--st
2626
} catch {
2727
// ignore
2828
}
29-
await execa("tar", ["xf", file, "-C", dest, ...flags])
29+
await execa("tar", ["xf", file, "-C", dest, ...flags], { stdio: "inherit" })
3030
return dest
3131
}

src/utils/setup/setupPipPack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function setupPipPack(name: string, version?: string): Promise<Inst
3838
}
3939
if (process.platform === "win32") {
4040
// https://github.com/pypa/pip/issues/10875#issuecomment-1030293005
41-
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"])
41+
execa.sync(python, ["-m", "pip", "install", "-U", "pip==21.3.1"], { stdio: "inherit" })
4242
}
4343

4444
execa.sync(python, ["-m", "pip", "install", version !== undefined && version !== "" ? `${name}==${version}` : name], {

src/vcpkg/vcpkg.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export async function setupVcpkg(_version: string, setupDir: string, _arch: stri
2323
}
2424

2525
if (!existsSync(join(setupDir, addShellExtension("bootstrap-vcpkg")))) {
26-
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
26+
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir), stdio: "inherit" })
2727
} else {
2828
warning(`Vcpkg folder already exists at ${setupDir}`)
2929
}
3030

31-
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true })
31+
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true, stdio: "inherit" })
3232
addPath(setupDir)
3333
// eslint-disable-next-line require-atomic-updates
3434
hasVCPKG = true

0 commit comments

Comments
 (0)