From 4d5f3fa80917f6be771d1cb837bf029d548eecf1 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 27 Jul 2021 16:04:31 -0600 Subject: [PATCH] refactor(helpers): echo docker run result code on exit --- helpers/ab-nginx.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/helpers/ab-nginx.sh b/helpers/ab-nginx.sh index e3dc2c7..cf012be 100644 --- a/helpers/ab-nginx.sh +++ b/helpers/ab-nginx.sh @@ -4,8 +4,6 @@ # start ab-nginx container using params file variables # -# TODO: add error trapping on docker run statements - # # text formatting presets if command -v tput >/dev/null; then @@ -358,8 +356,8 @@ else fi # -# exit gracefully -exit 0 +# exit with code from docker +exit "$?" # # exit return codes @@ -371,5 +369,6 @@ exit 0 # 11 no container found with specified name # 12 unable to stop container # 13 unable to remove container +# other refer to docker exit codes #EOF