forked from toolshed/abra
fix: handle flags order validatio better
Closes coop-cloud/organising#214.
This commit is contained in:
@ -360,6 +360,10 @@ intended as the target server. This is useful when you want to have your entire
|
||||
Co-op Cloud config located on the server itself, and not on your local
|
||||
developer machine.
|
||||
|
||||
Example:
|
||||
|
||||
abra server add --local
|
||||
|
||||
Otherwise, you may specify a remote server. The <domain> argument must be a
|
||||
publicy accessible domain name which points to your server. You should have SSH
|
||||
access to this server, Abra will assume port 22 and will use your current
|
||||
@ -394,7 +398,7 @@ You may omit flags to avoid performing this provisioning logic.
|
||||
},
|
||||
ArgsUsage: "<domain> [<user>] [<port>]",
|
||||
Action: func(c *cli.Context) error {
|
||||
if c.Args().Len() > 0 && local {
|
||||
if c.Args().Len() > 0 && local || !internal.ValidateSubCmdFlags(c) {
|
||||
err := errors.New("cannot use '<domain>' and '--local' together")
|
||||
internal.ShowSubcommandHelpAndError(c, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user