mirror of https://github.com/aminya/setup-cpp
fix: ensure existence of the pipx folders
This commit is contained in:
parent
5f8ace2495
commit
cc30e9b1d5
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -103,6 +103,7 @@
|
|||
"is-url-online": "^1.5.0",
|
||||
"jest": "^29.7.0",
|
||||
"micro-memoize": "^4.1.2",
|
||||
"mkdirp": "^3.0.1",
|
||||
"mri": "^1.2.0",
|
||||
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#97843d525947e3f3776ee359b597316909754c4d",
|
||||
"npm-check-updates": "^16.14.12",
|
||||
|
|
|
@ -107,6 +107,9 @@ importers:
|
|||
micro-memoize:
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2
|
||||
mkdirp:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
mri:
|
||||
specifier: ^1.2.0
|
||||
version: 1.2.0
|
||||
|
@ -210,9 +213,6 @@ importers:
|
|||
admina:
|
||||
specifier: 1.0.1
|
||||
version: 1.0.1
|
||||
untildify:
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.0
|
||||
|
||||
packages:
|
||||
|
||||
|
@ -8131,6 +8131,12 @@ packages:
|
|||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/mkdirp@3.0.1:
|
||||
resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==}
|
||||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/mri@1.2.0:
|
||||
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -10308,11 +10314,6 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/untildify@5.0.0:
|
||||
resolution: {integrity: sha512-bOgQLUnd2G5rhzaTvh1VCI9Fo6bC5cLTpH17T5aFfamyXFYDbbdzN6IXdeoc3jBS7T9hNTmJtYUzJCJ2Xlc9gA==}
|
||||
engines: {node: '>=16'}
|
||||
dev: false
|
||||
|
||||
/update-browserslist-db@1.0.13(browserslist@4.22.2):
|
||||
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
|
||||
hasBin: true
|
||||
|
|
|
@ -16,6 +16,7 @@ import { setupDnfPack } from "./setupDnfPack"
|
|||
import { isUbuntu } from "../env/isUbuntu"
|
||||
import { setupAptPack } from "./setupAptPack"
|
||||
import { untildifyUser } from "untildify-user"
|
||||
import { mkdirp } from "mkdirp"
|
||||
|
||||
export type SetupPipPackOptions = {
|
||||
/** Whether to use pipx instead of pip */
|
||||
|
@ -60,12 +61,17 @@ export async function setupPipPackWithPython(
|
|||
const env = process.env
|
||||
|
||||
if (isPipx && user) {
|
||||
const pipxHome = await getPipxHome()
|
||||
await mkdirp(pipxHome)
|
||||
|
||||
// install to user home
|
||||
env.PIPX_HOME = await getPipxHome()
|
||||
env.PIPX_HOME = pipxHome
|
||||
|
||||
const pipxBinDir = getPipxBinDir()
|
||||
env.PIPX_BIN_DIR = pipxBinDir
|
||||
await addPath(pipxBinDir)
|
||||
await mkdirp(pipxBinDir)
|
||||
|
||||
env.PIPX_BIN_DIR = pipxBinDir
|
||||
}
|
||||
|
||||
execaSync(givenPython, ["-m", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {
|
||||
|
|
Loading…
Reference in New Issue