Shell: Update: Print error if no update file name is specified

This commit is contained in:
Mario Hüttel 2021-04-10 22:28:30 +02:00
parent 08606689b4
commit 28e42d3306

View File

@ -655,6 +655,11 @@ shellmatta_retCode_t shell_cmd_update(const shellmatta_handle_t handle, const ch
}
}
if (!update_file || !strlen(update_file)) {
shellmatta_printf(handle, "Please specify a valid update file!\r\n");
return SHELLMATTA_ERROR;
}
updater_update_from_file(update_file);
return SHELLMATTA_OK;