File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 Write-Host "--- Priming Python environments ---"
6262
6363 $PYTHON_INFO = omnipkg info python 2>&1
64- $PYTHON_39_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.9:' | ForEach-Object { ($_ -split '\s+')[3] })
65- $PYTHON_310_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.10:' | ForEach-Object { ($_ -split '\s+')[3] })
66- $PYTHON_311_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.11:' | ForEach-Object { ($_ -split '\s+')[3] })
64+ # Use -split ':' then get the last part (the path) and trim whitespace
65+ $PYTHON_39_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.9:' | ForEach-Object { ($_ -split ':',2)[1].Trim() })
66+ $PYTHON_310_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.10:' | ForEach-Object { ($_ -split ':',2)[1].Trim() })
67+ $PYTHON_311_EXE = ($PYTHON_INFO -split '\r?\n' | Select-String -Pattern 'Python 3.11:' | ForEach-Object { ($_ -split ':',2)[1].Trim() })
6768
6869 if ($PYTHON_39_EXE) {
6970 Write-Host "Priming Python 3.9 by forcing KB rebuild..."
You can’t perform that action at this time.
0 commit comments