Plugins: Remove dead CLI code and use pkg/plugins for uninstall process (#67711)

* remove dead code and use pkg/plugins for uninstall process

* fix linter
This commit is contained in:
Will Browne
2023-05-03 14:52:57 +02:00
committed by GitHub
parent 471a03328b
commit 6cd042ed16
8 changed files with 42 additions and 125 deletions

View File

@ -49,15 +49,16 @@ func (cmd Command) upgradeAllCommand(c utils.CommandLine) error {
}
}
ctx := context.Background()
for _, p := range pluginsToUpgrade {
logger.Infof("Updating %v \n", p.ID)
err := services.RemoveInstalledPlugin(pluginsDir, p.ID)
err = uninstallPlugin(ctx, p.ID, c)
if err != nil {
return err
}
err = installPlugin(context.Background(), p.ID, "", c)
err = installPlugin(ctx, p.ID, "", c)
if err != nil {
return err
}