forked from toolshed/abra
refactor: deal with err from ShowSubcommandHelp
This commit is contained in:
@ -26,8 +26,7 @@ later for more advanced use cases.
|
||||
Action: func(c *cli.Context) error {
|
||||
host := c.Args().First()
|
||||
if host == "" {
|
||||
cli.ShowSubcommandHelp(c)
|
||||
return nil
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
}
|
||||
|
||||
cl, err := client.NewClientWithContext(host)
|
||||
|
@ -66,8 +66,7 @@ environment variable or otherwise passing the "--env/-e" flag.
|
||||
Action: func(c *cli.Context) error {
|
||||
name := c.Args().First()
|
||||
if name == "" {
|
||||
cli.ShowSubcommandHelp(c)
|
||||
return nil
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
@ -14,8 +14,7 @@ var serverRemoveCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
server := c.Args().First()
|
||||
if server == "" {
|
||||
cli.ShowSubcommandHelp(c)
|
||||
return nil
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
}
|
||||
if err := client.DeleteContext(server); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
Reference in New Issue
Block a user