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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
Vanilla 2024-04-18 21:46:04 +08:00 committed by GitHub
parent eac02a61e1
commit 817f787947
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {