This commit is contained in:
Vladimir Safonkin 2021-02-04 11:20:55 +03:00
parent fabe7d52fe
commit 1317beb53a

View File

@ -19,7 +19,7 @@ if ($args[1])
# SDKs are listed on multiple lines with the path afterwards in square brackets # SDKs are listed on multiple lines with the path afterwards in square brackets
$version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } $version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() }
Write-Host "Version $version" Write-Host "Version $version"
if ($version -notmatch $args[1]) if (-not ($version -contains $args[1]))
{ {
Write-Host "PATH='$env:path'" Write-Host "PATH='$env:path'"
throw "Unexpected version" throw "Unexpected version"