Fix asset prefix not working with sudo

This commit is contained in:
Syniis 2024-01-27 17:34:25 +01:00
parent 488922ac94
commit 04acb82d75

View File

@ -212,6 +212,9 @@ fn preproccess_command(
break;
}
},
ArgumentSpec::AssetPath(_, prefix, _, _) => {
*arg = prefix.to_string() + arg;
},
_ => {},
}
if matches!(arg_spec.requirement(), Requirement::Required) {
@ -221,9 +224,6 @@ fn preproccess_command(
} else if matches!(cmd_args.last(), Some(ArgumentSpec::SubCommand)) {
could_be_entity_target = true;
}
if let Some(ArgumentSpec::AssetPath(_, prefix, _, _)) = cmd_args.get(i) {
*arg = prefix.to_string() + arg;
}
if could_be_entity_target && arg.starts_with(ClientEntityTarget::PREFIX) {
let target_str = arg.trim_start_matches(ClientEntityTarget::PREFIX);
let target = ClientEntityTarget::iter()