diff --git a/engine/controllers/command_line_parser.cc b/engine/controllers/command_line_parser.cc index 31ace9ffd..d64104197 100644 --- a/engine/controllers/command_line_parser.cc +++ b/engine/controllers/command_line_parser.cc @@ -388,6 +388,12 @@ void CommandLineParser::SetupSystemCommands() { update_cmd->group(kSystemGroup); update_cmd->add_option("-v", cml_data_.cortex_version, ""); update_cmd->callback([this] { +#if !defined(_WIN32) + if (getuid()) { + CLI_LOG("Error: Not root user. Please run with sudo."); + return; + } +#endif commands::CortexUpdCmd cuc; cuc.Exec(cml_data_.cortex_version); cml_data_.check_upd = false;