Only restore previously installed VS versions

This commit is contained in:
Manuel Thalmann 2024-03-24 17:17:57 +01:00
parent 79cc1e3db4
commit 22f3932ada

View file

@ -37,13 +37,11 @@ $null = New-Module {
Write-Host "Restoring Visual Studio"; Write-Host "Restoring Visual Studio";
foreach ($version in $versions) { foreach ($version in $versions) {
Write-Information "Restoring $($version[1]): $($version[2])";
$configFileName = Get-ConfigPath $context $version[0]; $configFileName = Get-ConfigPath $context $version[0];
$arguments = "";
if (Test-Path $configFileName) { if (Test-Path $configFileName) {
Write-Information "Restoring $($version[1]): $($version[2])";
$arguments = "--config `"$configFileName`""; $arguments = "--config `"$configFileName`"";
}
choco install -y $version[0] --params "$arguments"; choco install -y $version[0] --params "$arguments";
$context.RemoveDesktopIcon("CocosCreator*"); $context.RemoveDesktopIcon("CocosCreator*");
@ -51,3 +49,4 @@ $null = New-Module {
} }
} }
} }
}