Prefer version when available for dotnet-install (#15810)
This commit is contained in:
parent
ac762c1cce
commit
408c4fd9ad
|
@ -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 }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue