mirror of https://github.com/aminya/setup-cpp
fix: fix the pipx packages bin directory
This commit is contained in:
parent
4d73853d57
commit
c9bc540d32
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
|
@ -62,7 +62,9 @@ export async function setupPipPackWithPython(
|
||||||
? await pipxPackageInstalled(givenPython, nameOnly)
|
? await pipxPackageInstalled(givenPython, nameOnly)
|
||||||
: await pipPackageIsInstalled(givenPython, nameOnly)
|
: await pipPackageIsInstalled(givenPython, nameOnly)
|
||||||
if (installed) {
|
if (installed) {
|
||||||
const binDir = await finishPipPackageInstall(givenPython, nameOnly)
|
const binDir = isPipx
|
||||||
|
? await finishPipxPackageInstall()
|
||||||
|
: await finishPipPackageInstall(givenPython, nameOnly)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,10 +101,16 @@ export async function setupPipPackWithPython(
|
||||||
throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)
|
throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const binDir = await finishPipPackageInstall(givenPython, nameOnly)
|
const binDir = isPipx
|
||||||
|
? await finishPipxPackageInstall()
|
||||||
|
: await finishPipPackageInstall(givenPython, nameOnly)
|
||||||
return { binDir }
|
return { binDir }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function finishPipxPackageInstall() {
|
||||||
|
return getPipxBinDir()
|
||||||
|
}
|
||||||
|
|
||||||
async function finishPipPackageInstall(givenPython: string, name: string) {
|
async function finishPipPackageInstall(givenPython: string, name: string) {
|
||||||
const pythonBaseExecPrefix = await addPythonBaseExecPrefix(givenPython)
|
const pythonBaseExecPrefix = await addPythonBaseExecPrefix(givenPython)
|
||||||
const binDir = await findBinDir(pythonBaseExecPrefix, name)
|
const binDir = await findBinDir(pythonBaseExecPrefix, name)
|
||||||
|
|
Loading…
Reference in New Issue