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 b8ffce8
Showing 1 changed file with 3 additions and 3 deletions.
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 b8ffce8

Please sign in to comment.