File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -222,14 +222,16 @@ function Sort-ScoopManifestRootProperties {
222222 )
223223
224224 # Get wanted order from Scoop manifest schema
225- Write-Debug - Message (' {0}\..\schema.json' -f $PSScriptRoot )
226- $WantedOrder = [string []](
227- (
228- parse_json - path (
229- ' {0}\..\schema.json' -f $PSScriptRoot
230- )
231- ).' properties' .' PSObject' .' Properties' .' Name'
232- )
225+ if ([string ]::IsNullOrWhiteSpace($Script :WantedOrder )) {
226+ Write-Debug - Message (' {0}\..\schema.json' -f $PSScriptRoot )
227+ $Script :WantedOrder = [string []](
228+ (
229+ parse_json - path (
230+ ' {0}\..\schema.json' -f $PSScriptRoot
231+ )
232+ ).' properties' .' PSObject' .' Properties' .' Name'
233+ )
234+ }
233235
234236 # Create empty new object where properties will be added to
235237 $SortedObject = [PSCustomObject ]::new()
You can’t perform that action at this time.
0 commit comments