Skip to content

Commit 8daf638

Browse files
committed
fix: fix choco python installdir
1 parent b2741d0 commit 8daf638

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/python/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function setupPython(version: string, setupDir: string, arch: string) {
2323
export async function setupPythonViaSystem(version: string, setupDir: string, _arch: string) {
2424
switch (process.platform) {
2525
case "win32": {
26-
setupChocoPack("python3", version, setupDir ? [`/InstallDir:${setupDir}`] : [])
26+
setupChocoPack("python3", version, setupDir ? [`--params=/InstallDir:${setupDir}`] : [])
2727
// Adding the bin dir to the path
2828
/** The directory which the tool is installed to */
2929
activateWinPython(setupDir)

src/utils/setup/setupPipPack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { setupPython } from "../../python/python"
88
import { isBinUptoDate } from "./version"
99
import { join } from "path"
1010
import { getVersion } from "../../default_versions"
11+
import { untildify_user as untildify } from "../path/untildify"
1112

1213
let pip: string | undefined
1314

@@ -31,7 +32,7 @@ export async function setupPipPack(name: string, version?: string) {
3132
// test if pip executable is working
3233
await execa(pip, ["--version"], { stdio: "inherit" })
3334
} catch (err) {
34-
await setupPython(getVersion("python", undefined), "~/python", process.arch)
35+
await setupPython(getVersion("python", undefined), untildify("python"), process.arch)
3536
pip = "pip3"
3637
}
3738
}

0 commit comments

Comments
 (0)