From 7164f75e014cea2eb49d7be8121a3e4eb7a9b0c5 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 4 Feb 2021 12:18:06 +0300 Subject: [PATCH] Debug --- __tests__/verify-dotnet.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 3adda6e..27e39a0 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -10,18 +10,18 @@ $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } Write-Host "Version $version" if ($version -notmatch $args[0]) { - Write-Host "PATH='$env:path'" + Write-Host "PATH='$env:PATH'" throw "Unexpected version" } if ($args[1]) { # SDKs are listed on multiple lines with the path afterwards in square brackets - $version = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } - Write-Host "Version $version" - if (-not ($version -contains $args[1])) + $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } | Out-String + Write-Host "Version $versions" + if ($version -notmatch $args[1]) { - Write-Host "PATH='$env:path'" + Write-Host "PATH='$env:PATH'" throw "Unexpected version" } }