grafana-cli: Upgrade to urfave/cli v2 (#22402)

* grafana-cli: Upgrade to urfave/cli v2
This commit is contained in:
Arve Knudsen
2020-02-26 12:27:31 +01:00
committed by GitHub
parent 6bc369629d
commit eb98d9c15b
84 changed files with 10503 additions and 4755 deletions
@@ -22,13 +22,12 @@ func shouldUpgrade(installed string, remote *m.Plugin) bool {
return installedVersion.LessThan(latestVersion)
}
func upgradeAllCommand(c utils.CommandLine) error {
func (cmd Command) upgradeAllCommand(c utils.CommandLine) error {
pluginsDir := c.PluginDirectory()
localPlugins := s.GetLocalPlugins(pluginsDir)
remotePlugins, err := c.ApiClient().ListAllPlugins(c.GlobalString("repo"))
remotePlugins, err := cmd.Client.ListAllPlugins(c.String("repo"))
if err != nil {
return err
}
@@ -53,7 +52,7 @@ func upgradeAllCommand(c utils.CommandLine) error {
return err
}
err = InstallPlugin(p.Id, "", c)
err = InstallPlugin(p.Id, "", c, cmd.Client)
if err != nil {
return err
}