Skip to content

Commit

Permalink
Update Invoke-Preprocessing.ps1
Browse files Browse the repository at this point in the history
- Added `-Force` argument to Get-ChildItem functions at lines 80 and 90.
  • Loading branch information
ruxunderscore committed Sep 9, 2024
1 parent e2d5390 commit 2c765b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/Invoke-Preprocessing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
for ($i = 0; $i -lt $count; $i++) {
$excludedFile = $ExcludedFiles[$i]
$filePath = "$(($WorkingDir -replace ('\\$', '')) + '\' + ($excludedFile -replace ('\.\\', '')))"
if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File)) {
if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File -Force)) {
$failedFilesList += "'$filePath', "
}
}
Expand All @@ -87,7 +87,8 @@
}
}

$files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File
$files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File -Force

$numOfFiles = $files.Count

if ($numOfFiles -eq 0) {
Expand Down

0 comments on commit 2c765b1

Please sign in to comment.