Merge pull request #5212 from thaJeztah/fix_stack_sorting

cli/command/stack: fix faulty sort for sorting stacks
This commit is contained in:
Sebastiaan van Stijn 2024-07-01 15:08:04 +02:00 committed by GitHub
commit cd982b111a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -56,8 +56,7 @@ func format(out io.Writer, opts options.List, stacks []*formatter.Stack) error {
Format: fmt, Format: fmt,
} }
sort.Slice(stacks, func(i, j int) bool { sort.Slice(stacks, func(i, j int) bool {
return sortorder.NaturalLess(stacks[i].Name, stacks[j].Name) || return sortorder.NaturalLess(stacks[i].Name, stacks[j].Name)
!sortorder.NaturalLess(stacks[j].Name, stacks[i].Name)
}) })
return formatter.StackWrite(stackCtx, stacks) return formatter.StackWrite(stackCtx, stacks)
} }