Use a new approach for determining if the Visual Studio install failed.

Without this, we'll end up with unzip being unable to extract a ZIP file
if there are no logs (i.e. if the installation was successful), and as a
result we'll get a CI failure.
This commit is contained in:
Douglas R. Reno 2024-10-17 11:34:53 -05:00
parent e4a44db2f0
commit 71447018c5

View file

@ -35,11 +35,13 @@ jobs:
run: |
PATH='/mnt/c/Program Files (x86)/Microsoft Visual Studio/Installer':$PATH
vs="$(vswhere.exe -latest -property installationPath | tr -d '\r')"
if ! vs_installer.exe modify \
vs_installer.exe modify \
--quiet --norestart --noUpdateInstaller \
--installPath "$vs" \
--config .vsconfig; then
echo "vs_installer.exe exit code: $?"
--config .vsconfig
RESULT=$?
echo "vs_installer.exe exit code: $RESULT"
if [ $RESULT != 0]; then
cd /tmp
curl -fsSL https://aka.ms/vscollect.exe -o vscollect.exe
chmod +x vscollect.exe