Only restore previously installed VS versions
This commit is contained in:
parent
79cc1e3db4
commit
22f3932ada
1 changed files with 5 additions and 6 deletions
|
@ -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 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue