From 352d7e90838623b9ed335ed520231418a881446d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 2 Sep 2016 09:48:02 +0200 Subject: [PATCH] Add some debugging output --- bin/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/src/main.rs b/bin/src/main.rs index 75c0934f..7c2b3320 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -186,6 +186,8 @@ fn main() { }); } + debug!("Calling 'imag-{}' with args: {:?}", subcommand, subcommand_args); + match Command::new(format!("imag-{}", subcommand)) .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) @@ -196,12 +198,15 @@ fn main() { { Ok(exit_status) => { if !exit_status.success() { + debug!("{} exited with non-zero exit code: {:?}", subcommand, exit_status); println!("{} exited with non-zero exit code", subcommand); exit(exit_status.code().unwrap_or(42)); } + debug!("Successful exit!"); }, Err(e) => { + debug!("Error calling the subcommand"); match e.kind() { ErrorKind::NotFound => { println!("No such command: 'imag-{}'", subcommand);