mirror of https://github.com/aminya/setup-cpp
fix: add .local/bin to path inside setupPip
This commit is contained in:
parent
9d9f62c579
commit
3defe39318
|
@ -1,15 +1,5 @@
|
|||
import { setupPip } from "../utils/setup/setupPip"
|
||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||
|
||||
export async function setupConan(version?: string) {
|
||||
await setupPip("conan", version)
|
||||
|
||||
if (process.platform === "linux") {
|
||||
try {
|
||||
startGroup(`Add /home/runner/.local/bin to PATH`)
|
||||
addPath("/home/runner/.local/bin/")
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
import { setupPip } from "../utils/setup/setupPip"
|
||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||
|
||||
export async function setupGcovr(version?: string) {
|
||||
await setupPip("gcovr", version)
|
||||
|
||||
if (process.platform === "linux") {
|
||||
try {
|
||||
startGroup(`Add /home/runner/.local/bin to PATH`)
|
||||
addPath("/home/runner/.local/bin/")
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
import { setupPip } from "../utils/setup/setupPip"
|
||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||
|
||||
export async function setupMeson(version?: string) {
|
||||
await setupPip("meson", version)
|
||||
|
||||
if (process.platform === "linux") {
|
||||
try {
|
||||
startGroup(`Add /home/runner/.local/bin to PATH`)
|
||||
addPath("/home/runner/.local/bin/")
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { exec } from "@actions/exec"
|
||||
import which from "which"
|
||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||
|
||||
/** A function that installs a package using pip */
|
||||
export async function setupPip(name: string, version?: string) {
|
||||
|
@ -10,4 +11,13 @@ export async function setupPip(name: string, version?: string) {
|
|||
if (exit !== 0) {
|
||||
throw new Error(`Failed to install ${name} ${version}`)
|
||||
}
|
||||
|
||||
if (process.platform === "linux") {
|
||||
try {
|
||||
startGroup(`Add /home/runner/.local/bin to PATH`)
|
||||
addPath("/home/runner/.local/bin/")
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue