From 22f3932adaeb2458693efd34c0b5f4773ac10e58 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 24 Mar 2024 17:17:57 +0100 Subject: [PATCH] Only restore previously installed VS versions --- scripts/Windows/Software/VisualStudio/Manage.ps1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/Windows/Software/VisualStudio/Manage.ps1 b/scripts/Windows/Software/VisualStudio/Manage.ps1 index 11ff11ba..cc34f7c2 100644 --- a/scripts/Windows/Software/VisualStudio/Manage.ps1 +++ b/scripts/Windows/Software/VisualStudio/Manage.ps1 @@ -37,17 +37,16 @@ $null = New-Module { Write-Host "Restoring Visual Studio"; foreach ($version in $versions) { - Write-Information "Restoring $($version[1]): $($version[2])"; $configFileName = Get-ConfigPath $context $version[0]; - $arguments = ""; if (Test-Path $configFileName) { + Write-Information "Restoring $($version[1]): $($version[2])"; $arguments = "--config `"$configFileName`""; - } - choco install -y $version[0] --params "$arguments"; - $context.RemoveDesktopIcon("CocosCreator*"); - $context.RemoveDesktopIcon("Unity Hub*"); + choco install -y $version[0] --params "$arguments"; + $context.RemoveDesktopIcon("CocosCreator*"); + $context.RemoveDesktopIcon("Unity Hub*"); + } } } }