do not default to info if no command specificied

This commit is contained in:
proddy
2021-06-08 18:22:18 +02:00
parent a84ae9e7cc
commit ee6a09c9df

View File

@@ -377,14 +377,14 @@ void EMSESPShell::add_console_commands() {
JsonObject json = doc.to<JsonObject>();
bool ok = false;
// validate the command
// validate that a command is present
if (arguments.size() < 2) {
// no cmd specified, default to empty command
if (Command::call(device_type, "", "", -1, json)) {
serializeJsonPretty(doc, shell);
shell.println();
return;
}
// // no cmd specified, default to empty command
// if (Command::call(device_type, "", "", -1, json)) {
// serializeJsonPretty(doc, shell);
// shell.println();
// return;
// }
shell.print(F("Missing command. Available commands are: "));
Command::show(shell, device_type, false); // non-verbose mode
return;