fix: make more server new command more robust
All checks were successful
continuous-integration/drone/push Build is passing

See coop-cloud/organising#163.
This commit is contained in:
2021-09-10 14:49:25 +02:00
parent 3c3d8dc0e7
commit 683ef0c3de
2 changed files with 82 additions and 12 deletions

View File

@ -41,3 +41,14 @@ func ValidateApp(c *cli.Context) config.App {
return app
}
// ValidateDomain ensures the domain name arg is valid.
func ValidateDomain(c *cli.Context) string {
domainName := c.Args().First()
if domainName == "" {
ShowSubcommandHelpAndError(c, errors.New("no domain provided"))
}
return domainName
}