From 70bf1b25cb044e3dc2266440c31f0684d5df6656 Mon Sep 17 00:00:00 2001 From: Lloyd Watkin Date: Thu, 4 Jul 2024 15:25:09 +0100 Subject: [PATCH] Use `fail` over `exit` --- lib/capistrano/asg/tasks/rolling.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/capistrano/asg/tasks/rolling.rake b/lib/capistrano/asg/tasks/rolling.rake index 3071bc9..d50c4a4 100644 --- a/lib/capistrano/asg/tasks/rolling.rake +++ b/lib/capistrano/asg/tasks/rolling.rake @@ -125,7 +125,7 @@ namespace :rolling do end else logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?' - exit 1 + fail end end @@ -139,7 +139,7 @@ namespace :rolling do end else logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?' - exit 1 + fail end invoke 'deploy' @@ -206,7 +206,7 @@ namespace :rolling do logger.info "Auto Scaling Group: **#{name}**, completed with status '#{refresh.status}'." end end - exit 1 if failed + fail if failed end end end