Skip to content

Commit

Permalink
Modified Preprocessing to properly look for hidden files with argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruxunderscore committed Sep 8, 2024
1 parent e2d5390 commit 34cb9d2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tools/Invoke-Preprocessing.ps1
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,17 @@

$count = $ExcludedFiles.Count
if ((-NOT ($count -eq 0)) -AND (-NOT $SkipExcludedFilesValidation)) {
$failedFilesList = @()
for ($i = 0; $i -lt $count; $i++) {
$excludedFile = $ExcludedFiles[$i]
$filePath = "$(($WorkingDir -replace ('\\$', '')) + '\' + ($excludedFile -replace ('\.\\', '')))"
if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File)) {
$failedFilesList += "'$filePath', "
$filePath = Join-Path $WorkingDir ($excludedFile -replace '^\.\', '')
if (-NOT (Get-Item -Path $filePath -Force -ErrorAction SilentlyContinue)) {
$failedFilesList += "'$filePath'"
}
}
$failedFilesList = $failedFilesList -replace (',\s*$', '')
if (-NOT $failedFilesList -eq "") {
throw "[Invoke-Preprocessing] One or more File Paths & File Patterns were not found, you can use '-SkipExcludedFilesValidation' switch to skip this check, and the failed files are: $failedFilesList"
if ($failedFilesList.Count -gt 0) {
$failedFilesString = $failedFilesList -join ', '
throw "[Invoke-Preprocessing] One or more File Paths & File Patterns were not found, you can use '-SkipExcludedFilesValidation' switch to skip this check, and the failed files are: $failedFilesString"
}
}

Expand Down

0 comments on commit 34cb9d2

Please sign in to comment.