File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ $m = [System.Collections.Concurrent.ConcurrentBag[hashtable]]::new()
44
55$psPaths | ForEach-Object - Parallel {
66 $queue = $using :m
7- $files = Get-ChildItem - Path $_ - Recurse - File - Filter ' *.dsc.resource.*' - ErrorAction Ignore |
8- Where-Object - Property Extension -In @ (' .json' , ' .yaml' , ' .yml' )
9-
10- foreach ($file in $files ) {
11- $queue.Add (@ { manifestPath = $file.FullName })
7+ $searchPatterns = @ (' *.dsc.resource.json' , ' *.dsc.resource.yaml' , ' *.dsc.resource.yml' )
8+ foreach ($pattern in $searchPatterns ) {
9+ try {
10+ [System.IO.Directory ]::EnumerateFiles($_ , $pattern , ' AllDirectories' ) | ForEach-Object {
11+ $queue.Add (@ { manifestPath = $_ })
12+ }
13+ } catch { }
1214 }
13- } - ThrottleLimit 10
15+ } - ThrottleLimit 30
1416
15- @ ( $m ) | ConvertTo-Json - Compress
17+ [ array ] $m | ConvertTo-Json - Compress
You can’t perform that action at this time.
0 commit comments