diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index 82e9eedc461dd5..91a65db789d976 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -55,6 +55,10 @@ bool Command::InitArguments(int argc, char ** argv) { optionalArgsCount++; } + else if (argvExtraArgsCount == 0) + { + mandatoryArgsCount++; + } else { mandatoryArgsCount++;