diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 8153654..239ee3d 100755 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -87,13 +87,22 @@ jobs: ) foreach ($p in $paths) { if (Test-Path $p) { + # Make available to subsequent steps Add-Content -Path $env:GITHUB_PATH -Value $p + # Also update current step PATH so we can verify immediately + $env:PATH = "$p;$env:PATH" Write-Host "✅ Added to PATH: $p" } else { Write-Host "⚠️ Path not found: $p" } } - git --version + # Verify Git using absolute path to avoid PATH propagation timing issues + $gitCmd = 'C:\Program Files\Git\cmd\git.exe' + if (Test-Path $gitCmd) { + & $gitCmd --version + } else { + Write-Host "ℹ️ Git executable not found at $gitCmd; continuing." + } - name: 📥 Checkout 代码 uses: actions/checkout@v4