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

Function printOutdatedPackages

internal/boxcli/list.go:72–89  ·  view source on GitHub ↗

printOutdatedPackages prints a list of outdated packages.

(cmd *cobra.Command, box *devbox.Devbox)

Source from the content-addressed store, hash-verified

70
71// printOutdatedPackages prints a list of outdated packages.
72func printOutdatedPackages(cmd *cobra.Command, box *devbox.Devbox) error {
73 results, err := box.Outdated(cmd.Context())
74 if err != nil {
75 return errors.WithStack(err)
76 }
77
78 if len(results) == 0 {
79 cmd.Println("Your packages are up to date!")
80 return nil
81 }
82
83 cmd.Println("The following packages can be updated:")
84 for pkg, version := range results {
85 cmd.Printf(" * %-30s %s -> %s\n", pkg, version.Current, version.Latest)
86 }
87
88 return nil
89}

Callers 1

listCmdFunction · 0.85

Calls 1

OutdatedMethod · 0.80

Tested by

no test coverage detected