Update updates a plugin.
(i Installer)
| 127 | |
| 128 | // Update updates a plugin. |
| 129 | func 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. |
| 138 | func NewForSource(source, version string) (installer Installer, err error) { |
searching dependent graphs…