diff --git a/cmd/force.go b/cmd/force.go index c3cabe3..13323a4 100644 --- a/cmd/force.go +++ b/cmd/force.go @@ -84,6 +84,7 @@ var forceExplicitReconCmd = &cobra.Command{ and the master responds with the latest state for each task, if possible. `, Run: explicitRecon, + Args: cobra.MaximumNArgs(1), } func explicitRecon(cmd *cobra.Command, args []string) { @@ -91,11 +92,6 @@ func explicitRecon(cmd *cobra.Command, args []string) { fmt.Println("Forcing scheduler to perform an explicit reconciliation with Mesos") - if len(args) > 1 || len(args) < 0 { - fmt.Println("Only provide a batch size.") - os.Exit(1) - } - switch len(args) { case 0: fmt.Println("Using default batch size for explicit recon.") @@ -122,7 +118,6 @@ func explicitRecon(cmd *cobra.Command, args []string) { } else { fmt.Println("Explicit reconciliation started successfully") } - } var forceImplicitReconCmd = &cobra.Command{