forked from toolshed/abra
		
	fix: handle zone argument correctly
This commit is contained in:
		| @ -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 | ||||
| 		} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user