mirror of https://github.com/aminya/setup-cpp
fix: await addPath
This commit is contained in:
parent
a4f327ad7e
commit
0dca6ef345
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ export async function setupCppcheck(version: string | undefined, _setupCppDir: s
|
||||||
case "win32": {
|
case "win32": {
|
||||||
await setupChocoPack("cppcheck", version)
|
await setupChocoPack("cppcheck", version)
|
||||||
const binDir = "C:/Program Files/Cppcheck"
|
const binDir = "C:/Program Files/Cppcheck"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
|
|
|
@ -9,9 +9,9 @@ export async function setupDoxygen(version: string | undefined, _setupCppDir: st
|
||||||
case "win32": {
|
case "win32": {
|
||||||
await setupChocoPack("doxygen.install", version)
|
await setupChocoPack("doxygen.install", version)
|
||||||
await setupChocoPack("graphviz", version)
|
await setupChocoPack("graphviz", version)
|
||||||
addPath("C:/Program Files/Graphviz/bin")
|
await addPath("C:/Program Files/Graphviz/bin")
|
||||||
const binDir = "C:/Program Files/doxygen/bin"
|
const binDir = "C:/Program Files/doxygen/bin"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
|
|
|
@ -18,10 +18,10 @@ export async function setupGcc(version: string, _setupCppDir: string, arch: stri
|
||||||
await setupChocoPack("mingw", version)
|
await setupChocoPack("mingw", version)
|
||||||
if (arch === "x64" && existsSync("C:/tools/mingw64/bin")) {
|
if (arch === "x64" && existsSync("C:/tools/mingw64/bin")) {
|
||||||
binDir = "C:/tools/mingw64/bin"
|
binDir = "C:/tools/mingw64/bin"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
} else if (arch === "ia32" && existsSync("C:/tools/mingw32/bin")) {
|
} else if (arch === "ia32" && existsSync("C:/tools/mingw32/bin")) {
|
||||||
binDir = "C:/tools/mingw32/bin"
|
binDir = "C:/tools/mingw32/bin"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
} else if (existsSync("C:/ProgramData/Chocolatey/bin/g++.exe")) {
|
} else if (existsSync("C:/ProgramData/Chocolatey/bin/g++.exe")) {
|
||||||
binDir = "C:/ProgramData/Chocolatey/bin/"
|
binDir = "C:/ProgramData/Chocolatey/bin/"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,6 @@ export async function setupOpencppcoverage(version: string | undefined, _setupCp
|
||||||
}
|
}
|
||||||
await setupChocoPack("opencppcoverage", version)
|
await setupChocoPack("opencppcoverage", version)
|
||||||
const binDir = "C:/Program Files/OpenCppCoverage"
|
const binDir = "C:/Program Files/OpenCppCoverage"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ export async function setupBin(
|
||||||
info(`${name} ${version} was found in the cache.`)
|
info(`${name} ${version} was found in the cache.`)
|
||||||
const installDir = join(dir, extractedFolderName)
|
const installDir = join(dir, extractedFolderName)
|
||||||
const binDir = join(installDir, binRelativeDir)
|
const binDir = join(installDir, binRelativeDir)
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
return { installDir, binDir }
|
return { installDir, binDir }
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -77,7 +77,7 @@ export async function setupBin(
|
||||||
// Adding the bin dir to the path
|
// Adding the bin dir to the path
|
||||||
/** The directory which the tool is installed to */
|
/** The directory which the tool is installed to */
|
||||||
info(`Add ${binDir} to PATH`)
|
info(`Add ${binDir} to PATH`)
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
|
|
||||||
// check if inside Github Actions. If so, cache the installation
|
// check if inside Github Actions. If so, cache the installation
|
||||||
if (typeof process.env.RUNNER_TOOL_CACHE === "string") {
|
if (typeof process.env.RUNNER_TOOL_CACHE === "string") {
|
||||||
|
|
|
@ -26,6 +26,6 @@ export async function setupChocoPack(name: string, version?: string, args: strin
|
||||||
}
|
}
|
||||||
|
|
||||||
const binDir = "C:/ProgramData/Chocolatey/bin/"
|
const binDir = "C:/ProgramData/Chocolatey/bin/"
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ export async function setupPipPack(name: string, version?: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info(`${binDir} to PATH`)
|
info(`${binDir} to PATH`)
|
||||||
addPath(binDir)
|
await addPath(binDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
return { binDir }
|
return { binDir }
|
||||||
|
|
Loading…
Reference in New Issue