mirror of https://github.com/aminya/setup-cpp
fix: fix choco python installdir
This commit is contained in:
parent
b2741d0ee5
commit
8daf6389ac
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,7 @@ export function setupPython(version: string, setupDir: string, arch: string) {
|
||||||
export async function setupPythonViaSystem(version: string, setupDir: string, _arch: string) {
|
export async function setupPythonViaSystem(version: string, setupDir: string, _arch: string) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
setupChocoPack("python3", version, setupDir ? [`/InstallDir:${setupDir}`] : [])
|
setupChocoPack("python3", version, setupDir ? [`--params=/InstallDir:${setupDir}`] : [])
|
||||||
// Adding the bin dir to the path
|
// Adding the bin dir to the path
|
||||||
/** The directory which the tool is installed to */
|
/** The directory which the tool is installed to */
|
||||||
activateWinPython(setupDir)
|
activateWinPython(setupDir)
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { setupPython } from "../../python/python"
|
||||||
import { isBinUptoDate } from "./version"
|
import { isBinUptoDate } from "./version"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { getVersion } from "../../default_versions"
|
import { getVersion } from "../../default_versions"
|
||||||
|
import { untildify_user as untildify } from "../path/untildify"
|
||||||
|
|
||||||
let pip: string | undefined
|
let pip: string | undefined
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ export async function setupPipPack(name: string, version?: string) {
|
||||||
// test if pip executable is working
|
// test if pip executable is working
|
||||||
await execa(pip, ["--version"], { stdio: "inherit" })
|
await execa(pip, ["--version"], { stdio: "inherit" })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await setupPython(getVersion("python", undefined), "~/python", process.arch)
|
await setupPython(getVersion("python", undefined), untildify("python"), process.arch)
|
||||||
pip = "pip3"
|
pip = "pip3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue