Skip to content

Commit 29599a2

Browse files
author
Jack Cottom
committed
Add context to pdc command error
1 parent 632e899 commit 29599a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use structopt::StructOpt;
1515
use zip::{write::FileOptions, CompressionMethod};
1616
use zip_extensions::zip_create_from_directory_with_options;
1717

18-
#[cfg(unix)]
1918
use anyhow::Context;
2019

2120
#[cfg(target_os = "linux")]
@@ -378,7 +377,8 @@ impl Build {
378377
let status = cmd
379378
.stdout(std::process::Stdio::piped())
380379
.stderr(std::process::Stdio::piped())
381-
.status()?;
380+
.status()
381+
.with_context(|| format!("Command failed: {cmd:?}"))?;
382382
if !status.success() {
383383
bail!("pdc failed with error {:?}", status);
384384
}

0 commit comments

Comments
 (0)