@@ -52,6 +52,7 @@ type UpdateVersion struct {
52
52
func (d * Devbox ) Outdated (ctx context.Context ) (map [string ]UpdateVersion , error ) {
53
53
lockfile := d .Lockfile ()
54
54
outdatedPackages := map [string ]UpdateVersion {}
55
+ var warnings []string
55
56
56
57
for _ , pkg := range d .AllPackages () {
57
58
// For non-devbox packages, like flakes, we can skip for now
@@ -61,7 +62,8 @@ func (d *Devbox) Outdated(ctx context.Context) (map[string]UpdateVersion, error)
61
62
62
63
lockPackage , err := lockfile .FetchResolvedPackage (pkg .Versioned ())
63
64
if err != nil {
64
- return nil , errors .Wrap (err , "failed to fetch resolved package" )
65
+ warnings = append (warnings , fmt .Sprintf ("Note: unable to check updates for %s" , pkg .CanonicalName ()))
66
+ continue
65
67
}
66
68
existingLockPackage := lockfile .Packages [pkg .Raw ]
67
69
if lockPackage .Version == existingLockPackage .Version {
@@ -71,6 +73,12 @@ func (d *Devbox) Outdated(ctx context.Context) (map[string]UpdateVersion, error)
71
73
outdatedPackages [pkg .Versioned ()] = UpdateVersion {Current : existingLockPackage .Version , Latest : lockPackage .Version }
72
74
}
73
75
76
+ if len (warnings ) > 0 {
77
+ for _ , warning := range warnings {
78
+ fmt .Fprintf (d .stderr , "%s\n " , warning )
79
+ }
80
+ }
81
+
74
82
return outdatedPackages , nil
75
83
}
76
84
0 commit comments