summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-09-02 09:48:02 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-09-05 16:18:11 +0200
commit352d7e90838623b9ed335ed520231418a881446d (patch)
tree2773b3396661ffd97e480b29716b821afce77ab4 /bin
parent389c5b9033f74b11f6b365d1d7ed78a6db60c14a (diff)
Add some debugging output
Diffstat (limited to 'bin')
-rw-r--r--bin/src/main.rs5
1 files changed, 5 insertions, 0 deletions
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);