Ensure the agent exits with the right status to propagate failures up

Fixes #51
This commit is contained in:
R Tyler Croy 2020-11-28 14:38:26 -08:00
parent 02c34b30fd
commit 07f1dadea2
1 changed files with 5 additions and 2 deletions

View File

@ -93,9 +93,12 @@ async fn main() -> std::io::Result<()> {
set_common_env_vars();
run(&steps_dir, &invoke.steps, invoke.pipeline, Some(receiver))
let status = run(&steps_dir, &invoke.steps, invoke.pipeline, Some(receiver))
.expect("Failed to run pipeline");
println!("Agent exiting {:?}", status);
std::process::exit(status as i32);
}
};
Ok(())
}