[cli] fix log filename command arg check (#8270)

This commit is contained in:
Abtin Keshavarzian
2022-10-11 15:23:50 -07:00
committed by GitHub
parent 9c6b45c1dc
commit 131e42c60f
+1 -1
View File
@@ -3282,7 +3282,7 @@ template <> otError Interpreter::Process<Cmd("log")>(Arg aArgs[])
#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART) && OPENTHREAD_POSIX
else if (aArgs[0] == "filename")
{
VerifyOrExit(aArgs[1].IsEmpty(), error = OT_ERROR_INVALID_ARGS);
VerifyOrExit(!aArgs[1].IsEmpty(), error = OT_ERROR_INVALID_ARGS);
SuccessOrExit(error = otPlatDebugUart_logfile(aArgs[1].GetCString()));
}
#endif