MCPcopy
hub / github.com/helm/helm / Update

Function Update

internal/plugin/installer/installer.go:129–135  ·  view source on GitHub ↗

Update updates a plugin.

(i Installer)

Source from the content-addressed store, hash-verified

127
128// Update updates a plugin.
129func Update(i Installer) error {
130 if _, pathErr := os.Stat(i.Path()); os.IsNotExist(pathErr) {
131 slog.Warn("plugin does not exist", slog.String("path", i.Path()), slog.Any("error", pathErr))
132 return errors.New("plugin does not exist")
133 }
134 return i.Update()
135}
136
137// NewForSource determines the correct Installer for the given source.
138func NewForSource(source, version string) (installer Installer, err error) {

Callers 4

updatePluginFunction · 0.92
TestOCIInstaller_UpdateFunction · 0.85
TestVCSInstallerUpdateFunction · 0.85
TestHTTPInstallerUpdateFunction · 0.85

Calls 3

PathMethod · 0.65
UpdateMethod · 0.65
StringMethod · 0.45

Tested by 3

TestOCIInstaller_UpdateFunction · 0.68
TestVCSInstallerUpdateFunction · 0.68
TestHTTPInstallerUpdateFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…