fix: fix choco python installdir

This commit is contained in:
Amin Yahyaabadi 2022-02-04 15:06:37 -08:00
parent b2741d0ee5
commit 8daf6389ac
4 changed files with 5 additions and 4 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,7 @@ export function setupPython(version: string, setupDir: string, arch: string) {
export async function setupPythonViaSystem(version: string, setupDir: string, _arch: string) {
switch (process.platform) {
case "win32": {
setupChocoPack("python3", version, setupDir ? [`/InstallDir:${setupDir}`] : [])
setupChocoPack("python3", version, setupDir ? [`--params=/InstallDir:${setupDir}`] : [])
// Adding the bin dir to the path
/** The directory which the tool is installed to */
activateWinPython(setupDir)

View File

@ -8,6 +8,7 @@ import { setupPython } from "../../python/python"
import { isBinUptoDate } from "./version"
import { join } from "path"
import { getVersion } from "../../default_versions"
import { untildify_user as untildify } from "../path/untildify"
let pip: string | undefined
@ -31,7 +32,7 @@ export async function setupPipPack(name: string, version?: string) {
// test if pip executable is working
await execa(pip, ["--version"], { stdio: "inherit" })
} catch (err) {
await setupPython(getVersion("python", undefined), "~/python", process.arch)
await setupPython(getVersion("python", undefined), untildify("python"), process.arch)
pip = "pip3"
}
}