Skip to content

Commit cf74d0a

Browse files
fix: python path
1 parent a0b8e0c commit cf74d0a

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/build_node_shared.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,23 @@ jobs:
337337
338338
- name: Configure and Build (Windows)
339339
if: matrix.platform == 'win'
340-
shell: cmd
340+
shell: powershell
341341
run: |
342-
vcbuild.bat dll x64
342+
# Refresh PATH to pick up winget-installed Python
343+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
344+
345+
# Add Python to PATH explicitly (winget installs to this location)
346+
$pythonPath = "$env:LOCALAPPDATA\Programs\Python\Python312"
347+
if (Test-Path $pythonPath) {
348+
$env:Path = "$pythonPath;$pythonPath\Scripts;$env:Path"
349+
}
350+
351+
# Verify Python is accessible
352+
Write-Host "Python location: $(Get-Command python | Select-Object -ExpandProperty Source)"
353+
python --version
354+
355+
# Run vcbuild
356+
cmd /c "vcbuild.bat dll x64"
343357
344358
- name: Package assets
345359
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)