Skip to content

Commit 4c00cf3

Browse files
authored
[easy][global] Fix duplicate packages DEV-1281 (#672)
## Summary TSIA ## How was it tested? Added go_1_19 as global and local package. `devbox run echo 5`
1 parent 0eda044 commit 4c00cf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/impl/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"strings"
1414

1515
"github.com/pkg/errors"
16+
"github.com/samber/lo"
1617
"go.jetpack.io/devbox/internal/boxcli/usererr"
1718
"go.jetpack.io/devbox/internal/cuecfg"
1819
"go.jetpack.io/devbox/internal/debug"
@@ -68,7 +69,7 @@ func (c *Config) Packages(w io.Writer) []string {
6869
"Will use the local version. This may lead to version mismatch and "+
6970
"nix store bloat.\n")
7071
}
71-
return append(c.RawPackages, global.RawPackages...)
72+
return lo.Uniq(append(c.RawPackages, global.RawPackages...))
7273
}
7374

7475
func readConfig(path string) (*Config, error) {

0 commit comments

Comments
 (0)