Skip to content

Commit

Permalink
Print the error when running a command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Sep 23, 2024
1 parent 8b48f55 commit 00d1e5a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/espidf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ impl Tool {
self.test_command(),
);

let output = self
.test_command()
.output()
.unwrap_or_else(|_| panic!("Failed to run command: {:?}", self.test_command()));
let output = self.test_command().output().unwrap_or_else(|e| {
panic!(
"Failed to run command: {:?}; error: {e:?}",
self.test_command()
)
});

let regex = regex::Regex::new(&self.version_regex).expect("Invalid regex pattern provided");

Expand Down

0 comments on commit 00d1e5a

Please sign in to comment.