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*"); + } } } }