setup-cpp/src/opencppcoverage/opencppcoverage.ts

19 lines
580 B
TypeScript
Raw Normal View History

2021-09-18 10:17:21 +08:00
import { addPath } from "../utils/path/addPath"
2021-09-16 16:49:25 +08:00
import { setupChocoPack } from "../utils/setup/setupChocoPack"
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function setupOpencppcoverage(version: string | undefined, _setupCppDir: string, _arch: string) {
2021-09-16 16:49:25 +08:00
if (process.platform !== "win32") {
return
}
await setupChocoPack("opencppcoverage", version)
2021-09-20 20:30:10 +08:00
const binDir = activateOpencppcoverage()
return { binDir }
}
function activateOpencppcoverage() {
2021-09-17 02:52:24 +08:00
const binDir = "C:/Program Files/OpenCppCoverage"
2021-09-19 16:49:42 +08:00
addPath(binDir)
2021-09-20 20:30:10 +08:00
return binDir
2021-09-16 16:49:25 +08:00
}