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 {
106
106
}
107
107
})
108
108
$uniquePotentialNames = $potentialNames | Select-Object - Unique
109
- if ($uniquePotentialNames -and
110
- $uniquePotentialNames -isnot [Object []]) {
109
+ if ($uniquePotentialNames -and
110
+ $uniquePotentialNames -isnot [Object []]) {
111
111
$consolidations [$k ] = $uniquePotentialNames
112
112
}
113
113
}
@@ -121,7 +121,12 @@ function PipeScript.Optimizer.ConsolidateAspects {
121
121
" `$ $ ( $consolidate.Value ) = $ ( $consolidate.Key ) "
122
122
}
123
123
) -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
+ }
125
130
}
126
131
}
127
132
You can’t perform that action at this time.
0 commit comments