forked from toolshed/abra
refactor: use new internal arg failure func
This commit is contained in:
@ -4,12 +4,14 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"coopcloud.tech/abra/cli/formatter"
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"github.com/hetznercloud/hcloud-go/hcloud"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli/v2"
|
||||
@ -73,7 +75,7 @@ environment variable or otherwise passing the "--env/-e" flag.
|
||||
Action: func(c *cli.Context) error {
|
||||
name := c.Args().First()
|
||||
if name == "" {
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no name provided"))
|
||||
}
|
||||
|
||||
if hetznerCloudAPIToken == "" {
|
||||
@ -176,7 +178,7 @@ environment variable or otherwise passing the "--env/-e" flag.
|
||||
Action: func(c *cli.Context) error {
|
||||
name := c.Args().First()
|
||||
if name == "" {
|
||||
return cli.ShowSubcommandHelp(c)
|
||||
internal.ShowSubcommandHelpAndError(c, errors.New("no name provided"))
|
||||
}
|
||||
|
||||
if capsulAPIToken == "" {
|
||||
|
Reference in New Issue
Block a user