mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-26 13:23:05 +07:00
Debug
This commit is contained in:
parent
993f819e3d
commit
fabe7d52fe
@ -8,7 +8,7 @@ Write-Host "Found '$dotnet'"
|
|||||||
|
|
||||||
$version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() }
|
$version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() }
|
||||||
Write-Host "Version $version"
|
Write-Host "Version $version"
|
||||||
if ($version -contains $args[0])
|
if ($version -notmatch $args[0])
|
||||||
{
|
{
|
||||||
Write-Host "PATH='$env:path'"
|
Write-Host "PATH='$env:path'"
|
||||||
throw "Unexpected version"
|
throw "Unexpected version"
|
||||||
@ -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 (-not ($version -contains $args[1]))
|
if ($version -notmatch $args[1])
|
||||||
{
|
{
|
||||||
Write-Host "PATH='$env:path'"
|
Write-Host "PATH='$env:path'"
|
||||||
throw "Unexpected version"
|
throw "Unexpected version"
|
||||||
|
Loading…
Reference in New Issue
Block a user