forked from toolshed/abra
refactor: use new internal arg failure func
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
@ -14,7 +17,7 @@ var serverRemoveCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
server := c.Args().First()
|
||||
if server == "" {
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no server provided"))
|
||||
}
|
||||
if err := client.DeleteContext(server); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
Reference in New Issue
Block a user