preserve-tombs command guarded from using update argument when plugin not enabled

develop
Najeeb Al-Shabibi 2023-09-30 13:21:04 +01:00
parent 7e75fd6ebc
commit e2dcced8ef
1 changed files with 4 additions and 0 deletions

@ -101,6 +101,10 @@ static command_result do_command(color_ostream& out, std::vector<std::string>& p
return CR_OK;
}
if (params[0] == "update") {
if (!is_enabled) {
out.printerr("Cannot update %s when not enabled", plugin_name);
return CR_FAILURE;
}
CoreSuspender suspend;
update_tomb_assignments(out);
out.print("Updated tomb assignments\n");