mirror of https://github.com/docker/cli.git
Merge pull request #5212 from thaJeztah/fix_stack_sorting
cli/command/stack: fix faulty sort for sorting stacks
This commit is contained in:
commit
cd982b111a
|
@ -56,8 +56,7 @@ func format(out io.Writer, opts options.List, stacks []*formatter.Stack) error {
|
|||
Format: fmt,
|
||||
}
|
||||
sort.Slice(stacks, func(i, j int) bool {
|
||||
return sortorder.NaturalLess(stacks[i].Name, stacks[j].Name) ||
|
||||
!sortorder.NaturalLess(stacks[j].Name, stacks[i].Name)
|
||||
return sortorder.NaturalLess(stacks[i].Name, stacks[j].Name)
|
||||
})
|
||||
return formatter.StackWrite(stackCtx, stacks)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue