Skip to content

Commit 0c2fdee

Browse files
authored
Update build.yml
1 parent 33df313 commit 0c2fdee

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,15 @@ jobs:
272272
$installerPath = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
273273
$vsPath = & $vswherePath -latest -products * -property installationPath
274274
if (-not $vsPath) { Write-Error "Could not locate Visual Studio installation."; exit 1 }
275-
Write-Host "Found Visual Studio at: $vsPath"
275+
$verBefore = & $vswherePath -latest -products * -property installationVersion
276+
Write-Host "Found Visual Studio at: $vsPath (Version: $verBefore)"
276277
Write-Host "Applying updates silently via local installer..."
277278
$arguments = "update --installPath `"$vsPath`" --quiet --norestart"
278279
$process = Start-Process -FilePath $installerPath -ArgumentList $arguments -Wait -PassThru
279-
if ($process.ExitCode -eq 0) {
280-
Write-Host "Visual Studio updated successfully."
281-
} elseif ($process.ExitCode -eq 3010) {
282-
Write-Host "Visual Studio updated successfully (Reboot requested but ignored)."
280+
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
281+
$verAfter = & $vswherePath -latest -products * -property installationVersion
282+
Write-Host "Visual Studio updated successfully. (Exit Code: $($process.ExitCode))"
283+
Write-Host "Version upgraded from $verBefore to $verAfter"
283284
} else {
284285
Write-Error "Visual Studio update failed with exit code $($process.ExitCode)."
285286
Write-Host "========== BEGIN INSTALLER ERROR LOG =========="
@@ -294,7 +295,6 @@ jobs:
294295
Write-Host "=========== END INSTALLER ERROR LOG ==========="
295296
exit $process.ExitCode
296297
}
297-
298298
- name: Windows Configure VCode
299299
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
300300
if: runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)