refactor!: simple validation only

This commit is contained in:
decentral1se 2022-03-30 11:30:51 +02:00
parent b943a8b9b1
commit 0e23ec53d7
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 2 additions and 6 deletions

View File

@ -67,12 +67,8 @@ Example:
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
if len(c.Args()) <= 2 && !localCmd {
internal.ShowSubcommandHelpAndError(c, errors.New("missing <service>/<command>? did you mean to pass --local?"))
}
if len(c.Args()) > 2 && localCmd {
internal.ShowSubcommandHelpAndError(c, errors.New("cannot specify <service> and --local together"))
if localCmd && remoteUser != "" {
internal.ShowSubcommandHelpAndError(c, errors.New("cannot use --local & <user> together"))
}
abraSh := path.Join(config.RECIPES_DIR, app.Recipe, "abra.sh")