mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix asset prefix not working with sudo
This commit is contained in:
parent
488922ac94
commit
04acb82d75
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user