Skip to content

Commit

Permalink
Add context to pdc command error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Cottom committed Oct 1, 2024
1 parent 632e899 commit 29599a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use structopt::StructOpt;
use zip::{write::FileOptions, CompressionMethod};
use zip_extensions::zip_create_from_directory_with_options;

#[cfg(unix)]
use anyhow::Context;

#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -378,7 +377,8 @@ impl Build {
let status = cmd
.stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped())
.status()?;
.status()
.with_context(|| format!("Command failed: {cmd:?}"))?;
if !status.success() {
bail!("pdc failed with error {:?}", status);
}
Expand Down

0 comments on commit 29599a2

Please sign in to comment.