This commit is contained in:
2026-03-24 13:40:18 +00:00
parent 075fe8526c
commit c7e9acbdc2
21 changed files with 389 additions and 37 deletions
+10 -33
View File
@@ -116,41 +116,18 @@ fn dispatch(exe_dir: &Path, bin_name: &str, args: &[&str]) {
let bin_path = get_binary_path(exe_dir, bin_name);
if !bin_path.exists() {
// Tries to find the runtime with the exact name (prometeu-runtime-desktop)
// in case prometeu-runtime is just an alias or link that doesn't exist yet
let alt_bin_name = if bin_name == "prometeu-runtime" {
Some("prometeu-runtime-desktop")
} else {
None
};
let final_bin_path = if let Some(alt_name) = alt_bin_name {
let alt_path = get_binary_path(exe_dir, alt_name);
if alt_path.exists() {
alt_path
} else {
bin_path
eprintln!(
"prometeu: command '{}' is not yet available in this distribution",
match bin_name {
"prometeu-runtime" => "run/debug",
"prometeuc" => "build/verify c",
"prometeup" => "pack/verify p",
_ => bin_name,
}
} else {
bin_path
};
if !final_bin_path.exists() {
eprintln!(
"prometeu: command '{}' is not yet available in this distribution",
match bin_name {
"prometeu-runtime" => "run/debug",
"prometeuc" => "build/verify c",
"prometeup" => "pack/verify p",
_ => bin_name,
}
);
std::process::exit(1);
}
execute_bin(&final_bin_path, args);
} else {
execute_bin(&bin_path, args);
);
std::process::exit(1);
}
execute_bin(&bin_path, args);
}
fn execute_bin(bin_path: &Path, args: &[&str]) {