Skip to content

Commit 1e6f2d7

Browse files
committed
Sort and unique
1 parent 7ffb7b2 commit 1e6f2d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/boxcli/run.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"log/slog"
99
"slices"
10+
"sort"
1011
"strings"
1112

1213
"github.com/pkg/errors"
@@ -98,7 +99,8 @@ func listScripts(cmd *cobra.Command, flags runCmdFlags) []string {
9899
for _, box := range boxes {
99100
scripts = append(scripts, box.ListScripts()...)
100101
}
101-
return scripts
102+
sort.Strings(scripts)
103+
return lo.Uniq(scripts)
102104
}
103105
box, err := devbox.Open(devboxOpts)
104106
if err != nil {

0 commit comments

Comments
 (0)