From 28961e2c2d3fd70a93918613ba322df72fe5d001 Mon Sep 17 00:00:00 2001 From: Philipp Herzog Date: Fri, 11 Nov 2022 12:18:44 +0100 Subject: Introduce non-zero exit code for rollbacks Closes #179 --- src/cli.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cli.rs b/src/cli.rs index cc5a3ac..a32f8c5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -388,6 +388,8 @@ pub enum RunDeployError { PromptDeployment(#[from] PromptDeploymentError), #[error("Failed to revoke profile: {0}")] RevokeProfile(#[from] deploy::deploy::RevokeProfileError), + #[error("Deployment failed, rolled back to previous generation")] + Rollback } type ToDeploy<'a> = Vec<( @@ -577,7 +579,7 @@ async fn run_deploy( } } } - break; + return Err(RunDeployError::Rollback); } succeeded.push((deploy_data, deploy_defs)) } -- cgit v1.2.3