From 6da7e5160df068f77bcd1c981feb961867dad6dc Mon Sep 17 00:00:00 2001 From: TheTank20 Date: Sat, 8 Jul 2023 13:00:10 -0500 Subject: [PATCH] Update windows.yml --- .github/workflows/windows.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ed755a3..d9bda9b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -25,15 +25,21 @@ jobs: [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_} $Arguments = ('/c', "vs_installer.exe", '--layout D:\a\VSLayout', $workloadArgs, '--quiet') $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden - if ($process.ExitCode -eq 0) - { + if ($realProcess.ExitCode -eq 0) { + + } + else { + $realProcess = Get-Process vs_layout + if ($realProcess.ExitCode -eq 0) + { Write-Host "components have been successfully downloaded" Get-ChildItem D:\a\VSLayout\Microsoft.Windows.XPSupport.* - } - else - { + } + else + { Write-Host "components were not downloaded" exit 1 + } } - name: Install Windows XP Support for Visual Studio