mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 23:09:53 +00:00
[cli] fix extra error output when handling user CLI commands (#6562)
It also adds a check in `cli-misc.exp` to verify error on an invalid CLI command
This commit is contained in:
+1
-1
@@ -4901,7 +4901,7 @@ void Interpreter::ProcessLine(char *aBuf)
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
SuccessOrExit(ProcessUserCommands(argsLength, args));
|
||||
VerifyOrExit(ProcessUserCommands(argsLength, args) != OT_ERROR_NONE);
|
||||
OutputResult(OT_ERROR_INVALID_COMMAND);
|
||||
|
||||
exit:
|
||||
|
||||
@@ -173,4 +173,7 @@ expect "Done"
|
||||
send "ba state\n"
|
||||
expect "Done"
|
||||
|
||||
send "invalidcommand\n"
|
||||
expect_line "Error 35: InvalidCommand"
|
||||
|
||||
dispose_all
|
||||
|
||||
Reference in New Issue
Block a user