fix(assembler): replace unwrap on root.parent with safe fallback
root.parent().unwrap() at main.rs:45 panicked if AGENT_ROOT pointed at a filesystem root (e.g. AGENT_ROOT=/). Now falls back to root itself via .unwrap_or(root.as_path()) so the 'OK <manifest> → <path>' line just prints the absolute path in that edge case instead of aborting.
This commit is contained in:
parent
16d4b48c77
commit
30cd08b85b
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ fn main() -> ExitCode {
|
|||
Ok(out_path) => {
|
||||
let name = path.file_name().unwrap_or_default().to_string_lossy();
|
||||
match out_path {
|
||||
Some(p) => println!("OK {name} → {}", relative_to(&p, &root.parent().unwrap())),
|
||||
Some(p) => println!("OK {name} → {}", relative_to(&p, root.parent().unwrap_or(root.as_path()))),
|
||||
None => println!("OK {name}"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue