MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / handlePMUpdate

Function handlePMUpdate

cmd/update.go:74–82  ·  view source on GitHub ↗
(res updatepolicy.Result, binPath string)

Source from the content-addressed store, hash-verified

72}
73
74func handlePMUpdate(res updatepolicy.Result, binPath string) error {
75 pm := detectPackageManager(binPath)
76 currentVer := displayVersion(res.CurrentVersion)
77 latestVer := displayVersion(res.LatestVersion)
78
79 fmt.Println(tui.RenderPMInstructions(pm, currentVer, latestVer))
80
81 return usageErr("cannot auto-update: installation is managed by a package manager")
82}
83
84// handleExplicitOptionalUpdate handles explicit update requests.
85// Unlike automatic updates, this skips TTL caching and doesn't record attempt timestamps.

Callers 5

runUpdateCommandFunction · 0.85
TestHandlePMUpdate_ScoopFunction · 0.85

Calls 4

RenderPMInstructionsFunction · 0.92
detectPackageManagerFunction · 0.85
displayVersionFunction · 0.85
usageErrFunction · 0.85

Tested by 4

TestHandlePMUpdate_ScoopFunction · 0.68