( opts devopt.UpdateOpts, )
| 100 | } |
| 101 | |
| 102 | func (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 |
no test coverage detected