remove quotes from python version in bootstrap request URL (#32433)

This commit is contained in:
warriorstar-orion
2026-08-15 12:38:05 +00:00
committed by GitHub
parent b0c7497fce
commit b5489542cd
+4 -5
View File
@@ -18,7 +18,7 @@ function ExtractVersion {
param([string] $Path, [string] $Key)
foreach ($Line in Get-Content $Path) {
if ($Line.StartsWith("export $Key=")) {
return $Line.Substring("export $Key=".Length)
return $Line.Substring("export $Key=".Length).Trim('"')
}
}
throw "Couldn't find value for $Key in $Path"
@@ -42,10 +42,9 @@ if (!(Test-Path $PythonExe -PathType Leaf)) {
New-Item $Cache -ItemType Directory -ErrorAction silentlyContinue | Out-Null
$Archive = "$Cache/python-$PythonVersion-embed.zip"
Invoke-WebRequest `
"https://www.python.org/ftp/python/$PythonVersion/python-$PythonVersion-embed-amd64.zip" `
-OutFile $Archive `
-ErrorAction Stop
$RequestUrl = "https://www.python.org/ftp/python/$PythonVersion/python-$PythonVersion-embed-amd64.zip"
Write-Output "Downloading from: $RequestUrl"
Invoke-WebRequest $RequestUrl -OutFile $Archive -ErrorAction Stop
[System.IO.Compression.ZipFile]::ExtractToDirectory($Archive, $PythonDir)