diff --git a/cli/server/add.go b/cli/server/add.go index d2d15e9b..e218b280 100644 --- a/cli/server/add.go +++ b/cli/server/add.go @@ -54,12 +54,13 @@ All communication between Abra and the server will use this SSH connection. }, ArgsUsage: " [] []", Action: func(c *cli.Context) error { - if c.Args().Len() == 1 && !local { + + if c.Args().Len() == 2 && !local { err := errors.New("missing arguments or '--local'") internal.ShowSubcommandHelpAndError(c, err) } - if c.Args().Get(1) != "" && local { + if c.Args().Get(2) != "" && local { err := errors.New("cannot use '' and '--local' together") internal.ShowSubcommandHelpAndError(c, err) }