MCPcopy Index your code
hub / github.com/jetify-com/devbox / inputsToUpdate

Method inputsToUpdate

internal/devbox/update.go:102–120  ·  view source on GitHub ↗
(
	opts devopt.UpdateOpts,
)

Source from the content-addressed store, hash-verified

100}
101
102func (d *Devbox) inputsToUpdate(
103 opts devopt.UpdateOpts,
104) ([]*devpkg.Package, error) {
105 if len(opts.Pkgs) == 0 {
106 return d.AllPackages(), nil
107 }
108
109 var pkgsToUpdate []*devpkg.Package
110 for _, pkg := range opts.Pkgs {
111 found, err := d.findPackageByName(pkg)
112 if opts.IgnoreMissingPackages && errors.Is(err, searcher.ErrNotFound) {
113 continue
114 } else if err != nil {
115 return nil, err
116 }
117 pkgsToUpdate = append(pkgsToUpdate, found)
118 }
119 return pkgsToUpdate, nil
120}
121
122// updatePendingPackages updates the lockfile entries for each package, using
123// the right strategy per package kind. Flake refs warn-and-continue on

Callers 1

UpdateMethod · 0.95

Calls 3

AllPackagesMethod · 0.95
findPackageByNameMethod · 0.95
IsMethod · 0.80

Tested by

no test coverage detected