We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b948eca commit f017167Copy full SHA for f017167
PipeScript.psm1
@@ -1,6 +1,11 @@
1
-foreach ($file in (Get-ChildItem -Path "$psScriptRoot" -Filter "*-*" -Recurse)) {
+:ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$psScriptRoot" -Filter "*-*" -Recurse)) {
2
if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1
3
- if ($file.Name -match '\.[^\.]+\.ps1$') { continue } # Skip if the file is an unrelated file.
+ foreach ($exclusion in '\.[^\.]+\.ps1$') {
4
+ if (-not $exclusion) { continue }
5
+ if ($file.Name -match $exclusion) {
6
+ continue ToIncludeFiles # Skip excluded files
7
+ }
8
9
. $file.FullName
10
}
11
0 commit comments