verify version with wildcard

- add logic to remove duplicate sdk in verification test
 Please enter the commit message for your changes. Lines starting
This commit is contained in:
La'Kaleigh Harris 2021-11-15 14:44:15 +00:00 committed by GitHub
parent 3e4bb40ad3
commit 42dcac127e
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ jobs:
3.0.x 3.0.x
- name: Verify dotnet - name: Verify dotnet
shell: pwsh 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: test-setup-full-version:
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}

View File

@ -20,7 +20,7 @@ if($args.count -eq 1)
if ($args[1]) 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
$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" Write-Host "Installed versions: $versions"
$InstalledVersionCount = 0 $InstalledVersionCount = 0
foreach($arg in $args){ foreach($arg in $args){