fix: error out if missing server arg

This commit is contained in:
decentral1se 2021-08-02 00:37:25 +02:00
parent a1bce4661b
commit 6be54c670a
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -87,6 +87,10 @@ var serverRemoveCommand = &cli.Command{
HideHelp: true, HideHelp: true,
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
server := c.Args().First() server := c.Args().First()
if server == "" {
cli.ShowSubcommandHelp(c)
return nil
}
if err := client.DeleteContext(server); err != nil { if err := client.DeleteContext(server); err != nil {
logrus.Fatal(err) logrus.Fatal(err)
} }