Skip to content

Commit 06e2558

Browse files
Refactor public class file retrieval to use ternary operator for consistency
1 parent dcead30 commit 06e2558

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,7 @@ BeforeAll {
9393
}
9494
Write-Host '::endgroup::'
9595
$publicClassPath = Join-Path -Path $classPath -ChildPath 'public'
96-
$publicClassFiles = if (Test-Path -Path $publicClassPath) {
97-
(Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse)
98-
} else {
99-
$null
100-
}
96+
$publicClassFiles = (Test-Path -Path $publicClassPath) ? (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null
10197
Write-Host "::group:: - Public [$($publicClassFiles.Count)]"
10298
$publicClassFiles | ForEach-Object {
10399
Write-Host " - $($_.FullName)"

0 commit comments

Comments
 (0)