[v11.0.x] Cli: Check missing plugin parameter of plugin update command (#86522)

Cli: Check missing plugin parameter of plugin update command (#86410)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 817f787947)

Co-authored-by: Vanilla <osu_Vanilla@126.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-04-18 16:02:14 +02:00
committed by GitHub
co-authored by Vanilla
parent 6e2727c7ba
commit ac20c614a3
@@ -2,6 +2,7 @@ package commands
import (
"context"
"errors"
"fmt"
"github.com/fatih/color"
@@ -15,6 +16,9 @@ func upgradeCommand(c utils.CommandLine) error {
ctx := context.Background()
pluginsDir := c.PluginDirectory()
pluginID := c.Args().First()
if pluginID == "" {
return errors.New("please specify plugin to update")
}
localPlugin, err := services.GetLocalPlugin(pluginsDir, pluginID)
if err != nil {