Skip to content

Commit

Permalink
[easy][global] Fix duplicate packages DEV-1281 (jetify-com#672)
Browse files Browse the repository at this point in the history
## Summary

TSIA

## How was it tested?

Added go_1_19 as global and local package.

`devbox run echo 5`
  • Loading branch information
mikeland73 authored Feb 22, 2023
1 parent 0eda044 commit 4c00cf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/impl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"strings"

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

func readConfig(path string) (*Config, error) {
Expand Down

0 comments on commit 4c00cf3

Please sign in to comment.