Update build.yml

This commit is contained in:
Jay Lee
2026-03-05 16:21:49 -05:00
committed by GitHub
parent d71bf9b6cb
commit 539b91a27e

View File

@@ -271,20 +271,30 @@ jobs:
$vswherePath = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
$installerPath = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
$vsPath = & $vswherePath -latest -products * -property installationPath
if (-not $vsPath) { Write-Error "Could not locate Visual Studio installation."; exit 1 }
if (-not $vsPath) {
Write-Host "Could not locate Visual Studio installation."
exit 1
}
$verBefore = & $vswherePath -latest -products * -property installationVersion
Write-Host "Found Visual Studio at: $vsPath (Version: $verBefore)"
Write-Host "Applying updates silently via local installer..."
$arguments = "update --installPath `"$vsPath`" --quiet --norestart"
$process = Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait -PassThru
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
$verAfter = & $vswherePath -latest -products * -property installationVersion
Write-Host "Visual Studio updated successfully. (Exit Code: $($process.ExitCode))"
Write-Host "Version upgraded from $verBefore to $verAfter"
} else {
Write-Error "Visual Studio update failed with exit code $($process.ExitCode)."
# Changed to Write-Host so the script doesn't abort before dumping the log
Write-Host "Visual Studio update failed with exit code $($process.ExitCode)."
Write-Host "========== BEGIN INSTALLER ERROR LOG =========="
$logFile = Get-ChildItem -Path $env:TEMP -Filter "dd_setup_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if ($logFile) {
Write-Host "Dumping error details from: $($logFile.FullName)"
Write-Host "-----------------------------------------------"
@@ -292,9 +302,10 @@ jobs:
} else {
Write-Host "No dd_setup log file could be found in $env:TEMP."
}
Write-Host "=========== END INSTALLER ERROR LOG ==========="
exit $process.ExitCode
}
}
- name: Windows Configure VCode
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
if: runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'