Skip to content

Commit 45eb099

Browse files
committed
fix: use the cmake install path as the kcov bin path
1 parent 43d199d commit 45eb099

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/kcov/__tests__/kcov.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { info } from "@actions/core"
66

77
jest.setTimeout(300000)
88
describe("setup-Kcov", () => {
9-
if (process.platform === "win32") {
10-
it.todo("should setup kcov on windows")
9+
if (process.platform !== "win32") {
10+
it.todo("should setup kcov on non-Windows")
1111
return
1212
}
1313

src/kcov/kcov.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ async function buildKcov(file: string, dest: string) {
5959
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
6060
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
6161
execSudo("cmake", ["--install", "./build"], out)
62-
return out
62+
return "user/local/bin" // the cmake install prefix
6363
}
6464

6565
export async function setupKcov(versionGiven: string, setupDir: string, arch: string) {
66-
if (process.platform === "win32") {
67-
info("Kcov is not supported on Windows")
66+
if (process.platform !== "win32") {
67+
info("Kcov is not supported on non-linux")
6868
return
6969
}
7070

src/utils/setup/setupBin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export async function setupBin(
115115
const downloaded = await downloadTool(url)
116116
await extractFunction?.(downloaded, setupDir)
117117
} catch (err) {
118-
throw new Error(`Failed to download ${name} ${version} ${arch}: ${err}`)
118+
throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)
119119
}
120120
}
121121

0 commit comments

Comments
 (0)