Skip to content

Commit

Permalink
Lookup version correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Nov 5, 2024
1 parent cb5e1ec commit 74b7fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Bootstrap Salt
run: |
. .\bootstrap-salt.ps1 -RunService $false -Version $env:SaltVersion
. .\bootstrap-salt.ps1 -RunService $false -Version $env:SaltVersion -Verbose
- name: Test Bootstrap
run: |
Expand Down
6 changes: 3 additions & 3 deletions bootstrap-salt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ $versions_table | Sort-Object Name | Out-String | Write-Verbose
#===============================================================================
# Validate passed version
#===============================================================================
if ( $versions_table -notcontains $Version.ToLower() ) {
if ( $versions_table.Contains($Version.ToLower()) ) {
$Version = $versions_table[$Version.ToLower()]
} else {
Write-Host "Version $Version is not available" -ForegroundColor Red
Write-Host "Available versions are:" -ForegroundColor Yellow
$available_versions | ForEach-Object { Write-Host "- $_" -ForegroundColor Yellow }
exit 1
} else {
$Version = $versions_table[$Version.ToLower()]
}

#===============================================================================
Expand Down

0 comments on commit 74b7fe7

Please sign in to comment.