Skip to content

Commit

Permalink
Print stdout and stderr for external tool errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tux3 committed Jul 8, 2022
1 parent d84e3c2 commit f474ee1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/merge_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ use thiserror::Error;
/// Errors that happen while creating the merged output static library from the extracted inputs
#[derive(Debug, Error)]
pub enum MergeError {
#[error("{reason}: {tool:?} {args:?})")]
#[error(
"{reason}: {tool:?} {args:?})\nstdout: {}\nstderr: {}",
String::from_utf8_lossy(stdout),
String::from_utf8_lossy(stderr)
)]
ExternalToolError {
reason: String,
tool: String,
Expand Down

0 comments on commit f474ee1

Please sign in to comment.