diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-02-28 18:06:54 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-02-28 18:45:33 -0800 |
| commit | d979d9b491192764729e82c619d28baaf2d21031 (patch) | |
| tree | 994c968e8c18bd3c92798fe74cf25a5b360b9ddd /scripts/findVisualStudioInstallationInstances.ps1 | |
| parent | f3463c4867df66b8f91adc4e2aa795b59997eb9d (diff) | |
| download | vcpkg-d979d9b491192764729e82c619d28baaf2d21031.tar.gz vcpkg-d979d9b491192764729e82c619d28baaf2d21031.zip | |
Fix issue when isPrerelease is not available
Diffstat (limited to 'scripts/findVisualStudioInstallationInstances.ps1')
| -rw-r--r-- | scripts/findVisualStudioInstallationInstances.ps1 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index fba5f447e..cb51c345d 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -2,8 +2,10 @@ param( ) - +Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + $vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "<sol>::" -replace "::<eol>" $output = & $vswhereExe -prerelease -legacy -products * -format xml @@ -14,7 +16,13 @@ foreach ($instance in $asXml.instances.instance) { $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash $installationVersion = $instance.InstallationVersion - $isPrerelease = $instance.IsPrerelease + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + if ($isPrerelease -eq 0) { $releaseType = "PreferenceWeight3::StableRelease" |
