From bd053415e12c02c61853311e72ea397ad480d7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 21 Oct 2019 15:52:45 +0200 Subject: [PATCH] Propagate error code. --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5e109fb..43b108f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -166,7 +166,7 @@ fn main() { ); info!("Starting build process."); - Command::new("ssh") + let output = Command::new("ssh") .arg("-t") .arg(&build_server) .arg(build_command) @@ -222,4 +222,8 @@ fn main() { exit(-6); }); } + + if !output.status.success() { + exit(output.status.code().unwrap_or(0)) + } }