diff --git a/crates/summit-cli/src/main.rs b/crates/summit-cli/src/main.rs index 00bf32a..ccaa214 100644 --- a/crates/summit-cli/src/main.rs +++ b/crates/summit-cli/src/main.rs @@ -243,7 +243,7 @@ fn main() -> Result<()> { // A game given by its full path is started from its own folder: many look for their data there. if let Some(dir) = std::path::Path::new(&cmd[0]).parent().filter(|d| d.is_absolute() && d.is_dir()) { child.current_dir(dir); } let status = if let Some(eng) = eng { - let mut game = child.spawn()?; + let mut game = child.spawn().map_err(|e| anyhow::anyhow!("could not start {}: {e}", cmd[0]))?; let live = engine::Live { wait_secs: wait, watermark: if no_watermark { Some(false) } else { None } }; let mut args = engine::run_enhance_plan(&eng, game.id(), window.as_deref(), &p, &live); if summit_core::ui::path().map_or(false, |p| p.exists()) { @@ -265,7 +265,7 @@ fn main() -> Result<()> { engine::Ended::Engine => println!("the engine exited ({}); the game was stopped", eng_proc.wait()?), } status - } else { child.status()? }; + } else { child.status().map_err(|e| anyhow::anyhow!("could not start {}: {e}", cmd[0]))? }; drop(restore_guard); let secs = start.elapsed().as_secs(); if detached && !enhance {