From 8553e619726a128383028b331b34467b3bffe98c Mon Sep 17 00:00:00 2001 From: Philip Tricca Date: Tue, 31 Dec 2024 17:06:17 -0800 Subject: [PATCH] Fixup misleading error message when trying to make an iso. --- src/cdrw.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/cdrw.rs b/src/cdrw.rs index 4cac10a..d2ddd11 100644 --- a/src/cdrw.rs +++ b/src/cdrw.rs @@ -52,16 +52,15 @@ impl IsoWriter { .arg(path.as_ref()) .arg(self.tmpdir.as_ref()) .output() - .with_context(|| { - format!( - "failed to create ISO \"{}\" from dir \"{}\"", - path.as_ref().display(), - self.tmpdir.as_ref().display() - ) - })?; + .context("failed to execute mkisofs, check PATH")?; if !output.status.success() { - warn!("command failed with status: {}", output.status); + warn!( + "failed to create ISO \"{}\" from dir \"{}\" with status {}", + path.as_ref().display(), + self.tmpdir.as_ref().display(), + output.status, + ); warn!("stderr: \"{}\"", String::from_utf8_lossy(&output.stderr)); return Err(anyhow!(format!( "Failed to make ISO {} from directory {}",