fix: do not use python prefix for pipx installation

This commit is contained in:
Amin Yahyaabadi 2025-03-23 01:53:17 -07:00
parent 4c992d0556
commit 9a2e61232c
6 changed files with 9 additions and 6 deletions

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

View File

@ -76,7 +76,7 @@ async function setupPipx(foundPython: string) {
if (!(await hasPipxModule(foundPython))) {
// install pipx for the system-wide python
try {
await setupPipPackSystem("pipx", isArch())
await setupPipPackSystem("pipx", false)
} catch (err) {
notice(`pipx was not installed completely for the system-wide python: ${err}`)
}

View File

@ -276,9 +276,12 @@ async function findBinDir(dirs: string[], name: string) {
return dirs[dirs.length - 1]
}
export async function setupPipPackSystem(name: string, addPythonPrefix = true) {
export async function setupPipPackSystem(name: string, givenAddPythonPrefix?: boolean) {
if (process.platform === "linux") {
info(`Installing ${name} via the system package manager`)
const addPythonPrefix = name === "pipx" ? false : (givenAddPythonPrefix ?? true)
if (isArch()) {
return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)
} else if (hasDnf()) {