File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -1103,24 +1103,15 @@ function Get-UnitySetupInstance {
1103
1103
}
1104
1104
}
1105
1105
1106
- foreach ( $folder in $BasePath ) {
1106
+ $searchPaths = Get-ChildItem $BasePath | Get-ChildItem | ForEach-Object { $_.Directory.FullName }
1107
+ $searchPaths = $searchPaths | select - uniq
1108
+ $setupInstances = [UnitySetupInstance []]@ ()
1107
1109
1108
- if ( Test-Path " $folder \modules.json" ) {
1109
- $path = $folder
1110
- }
1111
- else {
1112
- $ivy = Get-ChildItem - Path $folder - Filter ivy.xml - Recurse - ErrorAction SilentlyContinue - Force | Select-Object - First 1
1113
-
1114
- if ( Test-Path $ivy.FullName ) {
1115
- $path = $ivy.FullName
1116
- }
1117
- }
1118
-
1119
- Get-ChildItem $path - Recurse - ErrorAction Ignore |
1120
- ForEach-Object {
1121
- [UnitySetupInstance ]::new((Join-Path $_.Directory " ..\..\..\..\..\" | Convert-Path ))
1122
- }
1110
+ foreach ( $path in $searchPaths ) {
1111
+ $setupInstances += , [UnitySetupInstance ]::new($path )
1123
1112
}
1113
+
1114
+ return $setupInstances
1124
1115
}
1125
1116
1126
1117
<#
You can’t perform that action at this time.
0 commit comments