MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / PromptUpdateIfAvailable

Method PromptUpdateIfAvailable

version/version.go:46–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func (v *VersionInfo) PromptUpdateIfAvailable() {
47 if v.IsOutdated {
48 fmt.Fprintln(os.Stderr, "A new version of the bootdev CLI is available!")
49 fmt.Fprintln(os.Stderr, "Please run the following command to update:")
50 fmt.Fprintln(os.Stderr, " bootdev upgrade")
51 fmt.Fprintln(os.Stderr, "or")
52 fmt.Fprintf(os.Stderr, " go install github.com/bootdotdev/bootdev@%s\n\n", v.LatestVersion)
53 }
54}
55
56// Returns true if the current version is older than the latest.
57func isOutdated(current string, latest string) bool {

Callers 2

ExecuteFunction · 0.80
requireUpdatedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected