Skip to content

Commit 19bf82d

Browse files
committed
Fix generate-checksums.ps1 bug
1 parent fc19a28 commit 19bf82d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/installer/bin/generate-checksums.ps1

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ function Get-FileHashSHA256 {
2525
$fullDirectoryPath = (Get-Item -Path $Directory).FullName
2626

2727
# Determine recursion based on $NoRecurse
28-
$searchOption = $NoRecurse ? [System.IO.SearchOption]::TopDirectoryOnly : [System.IO.SearchOption]::AllDirectories
28+
if ($NoRecurse) {
29+
$searchOption = [System.IO.SearchOption]::TopDirectoryOnly
30+
} else {
31+
$searchOption = [System.IO.SearchOption]::AllDirectories
32+
}
2933

3034
# Iterate over each file in the directory matching the pattern
3135
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse:$searchOption | ForEach-Object {

0 commit comments

Comments
 (0)