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

Function detectPackageManager

cmd/root.go:468–480  ·  view source on GitHub ↗
(binPath string)

Source from the content-addressed store, hash-verified

466}
467
468func detectPackageManager(binPath string) string {
469 p := strings.ToLower(binPath)
470 if strings.Contains(p, "/opt/homebrew/") || strings.Contains(p, "/usr/local/cellar/") {
471 return "homebrew"
472 }
473 if strings.Contains(p, "\\scoop\\apps\\") {
474 return "scoop"
475 }
476 if strings.Contains(p, "windowsapps") {
477 return "winget"
478 }
479 return ""
480}
481
482// kickoffSubscriptionCheck launches a fire-and-forget refresh of the
483// subscription-status cache so subsequent commands can surface a past_due

Callers 5

handlePMUpdateFunction · 0.85
TestDetectPackageManagerFunction · 0.85
handleMandatoryUpdateFunction · 0.85
handleOptionalUpdateFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestDetectPackageManagerFunction · 0.68