fix: handle zone argument correctly
This commit is contained in:
parent
84bf3ffa50
commit
d26fabe8ef
|
@ -279,12 +279,14 @@ func EnsureDNSValueFlag(c *cli.Context) error {
|
|||
|
||||
// EnsureZoneArgument ensures a zone argument is present.
|
||||
func EnsureZoneArgument(c *cli.Context) (string, error) {
|
||||
var zone string
|
||||
if c.Args().First() == "" && !NoInput {
|
||||
zone := c.Args().First()
|
||||
|
||||
if zone == "" && !NoInput {
|
||||
prompt := &survey.Input{
|
||||
Message: "Specify a domain name zone",
|
||||
Default: "example.com",
|
||||
}
|
||||
|
||||
if err := survey.AskOne(prompt, &zone); err != nil {
|
||||
return zone, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue