Skip to content

Commit 045494b

Browse files
test: simplify artifact wildcard pattern derivation
Agent-Logs-Url: https://github.com/PSModule/GitHub/sessions/2dc56a74-b30d-4c87-92fd-a00e4eba64b5 Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
1 parent 838239b commit 045494b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

tests/Artifacts.Tests.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ Describe 'Artifacts' {
4848
throw 'No artifacts found for this workflow run.'
4949
}
5050
$ArtifactName = ($artifacts | Select-Object -First 1).Name
51-
$ArtifactNameWildcard = if ($ArtifactName.Length -gt 2) {
52-
"$($ArtifactName.Substring(0, 1))*$($ArtifactName.Substring($ArtifactName.Length - 1, 1))"
53-
} else {
54-
"$ArtifactName*"
55-
}
51+
$ArtifactNameWildcard = "$ArtifactName*"
5652
}
5753
AfterAll {
5854
Get-GitHubContext -ListAvailable | Disconnect-GitHubAccount -Silent

0 commit comments

Comments
 (0)