mirror of https://github.com/aminya/setup-cpp
fix: do not install kcov globally
This commit is contained in:
parent
57de2d5de2
commit
4d96d91b82
|
@ -4,7 +4,6 @@ import untildify from "untildify"
|
|||
import which from "which"
|
||||
import { setupCmake } from "../cmake/cmake"
|
||||
import { getVersion } from "../default_versions"
|
||||
import { execSudo } from "../utils/exec/sudo"
|
||||
import { addBinExtension } from "../utils/extension/extension"
|
||||
import { extractTarByExe } from "../utils/setup/extract"
|
||||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||
|
@ -58,8 +57,9 @@ async function buildKcov(file: string, dest: string) {
|
|||
}
|
||||
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
|
||||
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
|
||||
execSudo("cmake", ["--install", "./build"], out)
|
||||
return "user/local/bin" // the cmake install prefix
|
||||
// execSudo("cmake", ["--install", "./build"], out)
|
||||
// return "user/local/bin" // the cmake install prefix
|
||||
return out
|
||||
}
|
||||
|
||||
export async function setupKcov(versionGiven: string, setupDir: string, arch: string) {
|
||||
|
|
|
@ -113,11 +113,11 @@ export async function setupBin(
|
|||
|
||||
try {
|
||||
const downloaded = await downloadTool(url)
|
||||
const extractedBinDir = await extractFunction?.(downloaded, setupDir)
|
||||
if (typeof extractedBinDir === "string") {
|
||||
binDir = extractedBinDir
|
||||
installDir = extractedBinDir
|
||||
}
|
||||
await extractFunction?.(downloaded, setupDir)
|
||||
// if (typeof extractedBinDir === "string") {
|
||||
// binDir = extractedBinDir
|
||||
// installDir = extractedBinDir
|
||||
// }
|
||||
} catch (err) {
|
||||
throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue