forked from toolshed/abra
fix: make more server new command more robust
See coop-cloud/organising#163.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user