fix: await addPath

This commit is contained in:
Amin Yahyaabadi 2021-09-18 07:30:16 -05:00
parent a4f327ad7e
commit 0dca6ef345
9 changed files with 12 additions and 12 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ export async function setupCppcheck(version: string | undefined, _setupCppDir: s
case "win32": {
await setupChocoPack("cppcheck", version)
const binDir = "C:/Program Files/Cppcheck"
addPath(binDir)
await addPath(binDir)
return { binDir }
}
case "darwin": {

View File

@ -9,9 +9,9 @@ export async function setupDoxygen(version: string | undefined, _setupCppDir: st
case "win32": {
await setupChocoPack("doxygen.install", 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"
addPath(binDir)
await addPath(binDir)
return { binDir }
}
case "darwin": {

View File

@ -18,10 +18,10 @@ export async function setupGcc(version: string, _setupCppDir: string, arch: stri
await setupChocoPack("mingw", version)
if (arch === "x64" && existsSync("C:/tools/mingw64/bin")) {
binDir = "C:/tools/mingw64/bin"
addPath(binDir)
await addPath(binDir)
} else if (arch === "ia32" && existsSync("C:/tools/mingw32/bin")) {
binDir = "C:/tools/mingw32/bin"
addPath(binDir)
await addPath(binDir)
} else if (existsSync("C:/ProgramData/Chocolatey/bin/g++.exe")) {
binDir = "C:/ProgramData/Chocolatey/bin/"
}

View File

@ -8,6 +8,6 @@ export async function setupOpencppcoverage(version: string | undefined, _setupCp
}
await setupChocoPack("opencppcoverage", version)
const binDir = "C:/Program Files/OpenCppCoverage"
addPath(binDir)
await addPath(binDir)
return { binDir }
}

View File

@ -53,7 +53,7 @@ export async function setupBin(
info(`${name} ${version} was found in the cache.`)
const installDir = join(dir, extractedFolderName)
const binDir = join(installDir, binRelativeDir)
addPath(binDir)
await addPath(binDir)
return { installDir, binDir }
}
} catch {
@ -77,7 +77,7 @@ export async function setupBin(
// Adding the bin dir to the path
/** The directory which the tool is installed to */
info(`Add ${binDir} to PATH`)
addPath(binDir)
await addPath(binDir)
// check if inside Github Actions. If so, cache the installation
if (typeof process.env.RUNNER_TOOL_CACHE === "string") {

View File

@ -26,6 +26,6 @@ export async function setupChocoPack(name: string, version?: string, args: strin
}
const binDir = "C:/ProgramData/Chocolatey/bin/"
addPath(binDir)
await addPath(binDir)
return { binDir }
}

View File

@ -52,7 +52,7 @@ export async function setupPipPack(name: string, version?: string) {
}
}
info(`${binDir} to PATH`)
addPath(binDir)
await addPath(binDir)
}
return { binDir }