Skip to content

Commit 3cefea3

Browse files
committed
minor requested changes
1 parent 8bf71ad commit 3cefea3

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

internal/devconfig/packages.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ func NewPackage(name string, values map[string]any) Package {
248248
// If the package has a list of platforms, it is enabled only on those platforms.
249249
// If the package has a list of excluded platforms, it is enabled on all platforms
250250
// except those.
251-
func (p *Package) enabledOnPlatform(platform string) bool {
251+
func (p *Package) IsEnabledOnPlatform() bool {
252+
platform := nix.MustGetSystem()
252253
if len(p.Platforms) > 0 {
253254
for _, plt := range p.Platforms {
254255
if plt == platform {
@@ -273,10 +274,6 @@ func (p *Package) VersionedName() string {
273274
return name
274275
}
275276

276-
func (p *Package) IsEnabledOnPlatform() bool {
277-
return p.enabledOnPlatform(nix.MustGetSystem())
278-
}
279-
280277
func (p *Package) UnmarshalJSON(data []byte) error {
281278
// First, attempt to unmarshal as a version-only string
282279
var version string

internal/impl/packages.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,7 @@ func (d *Devbox) ensurePackagesAreInstalled(ctx context.Context, mode installMod
243243
}
244244

245245
// Update lockfile with new packages that are not to be installed
246-
cfgPkgs, err := d.ConfigPackages()
247-
if err != nil {
248-
return err
249-
}
250-
for _, pkg := range cfgPkgs {
246+
for _, pkg := range d.configPackages() {
251247
if err := pkg.EnsureUninstallableIsInLockfile(); err != nil {
252248
return err
253249
}

0 commit comments

Comments
 (0)