File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ function PipeScript.Optimizer.ConsolidateAspects {
106106 }
107107 })
108108 $uniquePotentialNames = $potentialNames | Select-Object - Unique
109- if ($uniquePotentialNames -and
110- $uniquePotentialNames -isnot [Object []]) {
109+ if ($uniquePotentialNames -and
110+ $uniquePotentialNames -isnot [Object []]) {
111111 $consolidations [$k ] = $uniquePotentialNames
112112 }
113113 }
@@ -121,7 +121,12 @@ function PipeScript.Optimizer.ConsolidateAspects {
121121 " `$ $ ( $consolidate.Value ) = $ ( $consolidate.Key ) "
122122 }
123123 ) -join [Environment ]::NewLine) " )
124- # Update-PipeScript -RegexReplacement $regexReplacements -ScriptBlock $ScriptBlock -Prepend $prepend
124+ if ($consolidations.Count ) {
125+ Update-PipeScript - RegexReplacement $regexReplacements - ScriptBlock $ScriptBlock - Prepend $prepend
126+ }
127+ else {
128+ $ScriptBlock
129+ }
125130 }
126131}
127132
You can’t perform that action at this time.
0 commit comments