We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc19a28 commit 19bf82dCopy full SHA for 19bf82d
bin/installer/bin/generate-checksums.ps1
@@ -25,7 +25,11 @@ function Get-FileHashSHA256 {
25
$fullDirectoryPath = (Get-Item -Path $Directory).FullName
26
27
# Determine recursion based on $NoRecurse
28
-$searchOption = $NoRecurse ? [System.IO.SearchOption]::TopDirectoryOnly : [System.IO.SearchOption]::AllDirectories
+if ($NoRecurse) {
29
+ $searchOption = [System.IO.SearchOption]::TopDirectoryOnly
30
+} else {
31
+ $searchOption = [System.IO.SearchOption]::AllDirectories
32
+}
33
34
# Iterate over each file in the directory matching the pattern
35
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse:$searchOption | ForEach-Object {
0 commit comments