Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions engine/controllers/command_line_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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("You are not root, please run the command with `sudo`");
return;
}
#endif
commands::CortexUpdCmd cuc;
cuc.Exec(cml_data_.cortex_version);
cml_data_.check_upd = false;
Expand Down
Loading