Skip to content

Commit

Permalink
Handle empty/null alias in function (#9155)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Oct 14, 2024
1 parent 27a2d5a commit 77ed11b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions eng/scripts/live-test-resource-cleanup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ function Log($Message) {
Write-Host $Message
}

function IsValidAlias
function IsValidAlias([string]$Alias)
{
param(
[Parameter(Mandatory = $true)]
[string]$Alias
)

if (!$Alias) {
return $false
}

if ($OwnerAliasCache.ContainsKey($Alias)) {
return $OwnerAliasCache[$Alias]
}
Expand Down

0 comments on commit 77ed11b

Please sign in to comment.