diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2023-04-15 00:09:50 +0200 |
|---|---|---|
| committer | datdenkikniet <jcdra1@gmail.com> | 2023-04-15 00:09:50 +0200 |
| commit | fa92d8abe7810c8a32a37be49f162b795c226f4d (patch) | |
| tree | 2cc6ccb915b6e864c33a4321f0d51baf10d97865 /xtask/src/main.rs | |
| parent | f741475a3f552585f789b3b2b9c622b090e72057 (diff) | |
Add some QoL to run_command
Diffstat (limited to 'xtask/src/main.rs')
| -rw-r--r-- | xtask/src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index a7fd1d3..30608b9 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -44,6 +44,7 @@ const DEFAULT_FEATURES: &str = "test-critical-section"; #[derive(Debug, Clone)] pub struct RunResult { exit_status: ExitStatus, + full_command: String, stdout: String, stderr: String, } @@ -329,9 +330,12 @@ fn command_parser(command: &CargoCommand, overwrite: bool) -> anyhow::Result<()> | CargoCommand::Book { .. } | CargoCommand::ExampleSize { .. } => { let cargo_result = run_command(command)?; + let command = cargo_result.full_command; if let Some(exit_code) = cargo_result.exit_status.code() { if exit_code != exitcode::OK { - error!("Exit code from command: {exit_code}"); + error!("Command {command} failed."); + error!("Exit code: {exit_code}"); + if !cargo_result.stdout.is_empty() { info!("{}", cargo_result.stdout); } |
