Prefer version when available for dotnet-install (#15810)

This commit is contained in:
Aditya Patwardhan
2021-07-21 06:34:39 +00:00
committed by GitHub
parent ac762c1cce
commit 408c4fd9ad
+6 -1
View File
@@ -1781,10 +1781,15 @@ function Install-Dotnet {
Invoke-WebRequest -Uri $installObtainUrl/$installScript -OutFile $installScript
if (-not $environment.IsCoreCLR) {
$installArgs = @{
Channel = $Channel
Quality = $Quality
}
if ($Version) {
$installArgs += @{ Version = $Version }
} elseif ($Channel) {
$installArgs += @{ Channel = $Channel }
}
if ($InstallDir) {
$installArgs += @{ InstallDir = $InstallDir }
}