From 42dcac127e2fcff2d40a98dc4b5d55383a524c75 Mon Sep 17 00:00:00 2001 From: La'Kaleigh Harris <35268101+Xlient@users.noreply.github.com> Date: Mon, 15 Nov 2021 14:44:15 +0000 Subject: [PATCH] verify version with wildcard - add logic to remove duplicate sdk in verification test Please enter the commit message for your changes. Lines starting --- .github/workflows/workflow.yml | 2 +- __tests__/verify-dotnet.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8e83602..b433e19 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -54,7 +54,7 @@ jobs: 3.0.x - name: Verify dotnet shell: pwsh - run: __tests__/verify-dotnet.ps1 2.2.402 3.1.404 + run: __tests__/verify-dotnet.ps1 2.2.402 3.1.404 3.0 test-setup-full-version: runs-on: ${{ matrix.operating-system }} diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index 7068c87..3a377c7 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -20,7 +20,7 @@ if($args.count -eq 1) if ($args[1]) { # SDKs are listed on multiple lines with the path afterwards in square brackets - $versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } + $versions = & $dotnet --list-sdks select -Unique | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() } Write-Host "Installed versions: $versions" $InstalledVersionCount = 0 foreach($arg in $args){