mirror of https://github.com/aminya/setup-cpp
fix: use ChocolateyInstall env variable
This commit is contained in:
parent
4b0650a08c
commit
0fe9b461ac
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -56,7 +56,7 @@ export function setupChocolatey(
|
|||
if (maybeChoco !== null) {
|
||||
binDir = dirname(maybeChoco)
|
||||
} else {
|
||||
binDir = "C:/ProgramData/Chocolatey/bin/"
|
||||
binDir = `${process.env.ChocolateyInstall ?? "C:/ProgramData/chocolatey"}/bin`
|
||||
}
|
||||
|
||||
if (existsSync(binDir)) {
|
||||
|
|
|
@ -28,7 +28,7 @@ export function setupChocoPack(name: string, version?: string, args: string[] =
|
|||
execa.sync("choco", ["install", "-y", name, ...args], { env, extendEnv: false })
|
||||
}
|
||||
|
||||
const binDir = "C:/ProgramData/Chocolatey/bin/"
|
||||
const binDir = `${process.env.ChocolateyInstall ?? "C:/ProgramData/chocolatey"}/bin`
|
||||
addPath(binDir)
|
||||
return { binDir }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue