mirror of https://github.com/aminya/setup-cpp
fix: do not warn on pipx, venv, setuptools installations
This commit is contained in:
parent
75454f9c75
commit
b8fbd53a44
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@ import { dirname, join, parse as pathParse } from "path"
|
||||||
import { getExecOutput } from "@actions/exec"
|
import { getExecOutput } from "@actions/exec"
|
||||||
import ciInfo from "ci-info"
|
import ciInfo from "ci-info"
|
||||||
const { GITHUB_ACTIONS } = ciInfo
|
const { GITHUB_ACTIONS } = ciInfo
|
||||||
import { info, warning } from "ci-log"
|
import { info, notice, warning } from "ci-log"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import { readdir } from "fs/promises"
|
import { readdir } from "fs/promises"
|
||||||
|
@ -63,7 +63,7 @@ async function setupPipx(foundPython: string) {
|
||||||
await execa(foundPython, ["-m", "pipx", "ensurepath"], { stdio: "inherit" })
|
await execa(foundPython, ["-m", "pipx", "ensurepath"], { stdio: "inherit" })
|
||||||
await setupVenv(foundPython)
|
await setupVenv(foundPython)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)
|
notice(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ async function setupVenv(foundPython: string) {
|
||||||
try {
|
try {
|
||||||
await setupPipPackWithPython(foundPython, "venv", undefined, { upgrade: false, usePipx: false })
|
await setupPipPackWithPython(foundPython, "venv", undefined, { upgrade: false, usePipx: false })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
warning(`Failed to install venv: ${(err as Error).toString()}. Ignoring...`)
|
notice(`Failed to install venv: ${(err as Error).toString()}. Ignoring...`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ async function setupWheel(foundPython: string) {
|
||||||
})
|
})
|
||||||
await setupPipPackWithPython(foundPython, "wheel", undefined, { upgrade: false, isLibrary: true, usePipx: false })
|
await setupPipPackWithPython(foundPython, "wheel", undefined, { upgrade: false, isLibrary: true, usePipx: false })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
warning(`Failed to install setuptools/wheel: ${(err as Error).toString()}. Ignoring...`)
|
notice(`Failed to install setuptools/wheel: ${(err as Error).toString()}. Ignoring...`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,6 +277,10 @@ export function setupPipPackSystem(name: string, addPythonPrefix = true) {
|
||||||
return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])
|
||||||
}
|
}
|
||||||
} else if (process.platform === "darwin") {
|
} else if (process.platform === "darwin") {
|
||||||
|
if (["venv"].includes(name)) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return installBrewPack(name)
|
return installBrewPack(name)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in New Issue