Skip to content

Commit 4d96d91

Browse files
committed
fix: do not install kcov globally
1 parent 57de2d5 commit 4d96d91

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/kcov/kcov.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import untildify from "untildify"
44
import which from "which"
55
import { setupCmake } from "../cmake/cmake"
66
import { getVersion } from "../default_versions"
7-
import { execSudo } from "../utils/exec/sudo"
87
import { addBinExtension } from "../utils/extension/extension"
98
import { extractTarByExe } from "../utils/setup/extract"
109
import { setupAptPack } from "../utils/setup/setupAptPack"
@@ -58,8 +57,9 @@ async function buildKcov(file: string, dest: string) {
5857
}
5958
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
6059
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
61-
execSudo("cmake", ["--install", "./build"], out)
62-
return "user/local/bin" // the cmake install prefix
60+
// execSudo("cmake", ["--install", "./build"], out)
61+
// return "user/local/bin" // the cmake install prefix
62+
return out
6363
}
6464

6565
export async function setupKcov(versionGiven: string, setupDir: string, arch: string) {

src/utils/setup/setupBin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ export async function setupBin(
113113

114114
try {
115115
const downloaded = await downloadTool(url)
116-
const extractedBinDir = await extractFunction?.(downloaded, setupDir)
117-
if (typeof extractedBinDir === "string") {
118-
binDir = extractedBinDir
119-
installDir = extractedBinDir
120-
}
116+
await extractFunction?.(downloaded, setupDir)
117+
// if (typeof extractedBinDir === "string") {
118+
// binDir = extractedBinDir
119+
// installDir = extractedBinDir
120+
// }
121121
} catch (err) {
122122
throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)
123123
}

0 commit comments

Comments
 (0)