From cc76ea6406993e04271b2c58de1b2fb51e3b09e8 Mon Sep 17 00:00:00 2001 From: Zuzana Miklankova Date: Thu, 16 Nov 2023 16:43:13 +0100 Subject: [PATCH] remove all 'set -e' bash options from test-lib This commit is considered a hotfix. Some more thorough analysis needs to be done in the future. --- test-lib.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-lib.sh b/test-lib.sh index 642b5af..476c3b9 100644 --- a/test-lib.sh +++ b/test-lib.sh @@ -377,7 +377,6 @@ function ct_assert_container_creation_fails() { local max_attempts=10 local attempt=1 local cid_file=assert - set +e local old_container_args="${CONTAINER_ARGS-}" # we really work with CONTAINER_ARGS as with a string # shellcheck disable=SC2124 @@ -403,7 +402,6 @@ function ct_assert_container_creation_fails() { rm "$CID_FILE_DIR/$cid_file" fi [ -n "$old_container_args" ] && CONTAINER_ARGS="$old_container_args" - set -e return "$ret" } @@ -907,8 +905,9 @@ ct_s2i_build_as_df() # Run the entire thing inside a subshell so that we do not leak shell options outside of the function ( + # FIXME: removed temporarily, need proper fixing # Error out if any part of the build fails - set -e + # set -e # Use /tmp to not pollute cwd tmpdir=$(mktemp -d) @@ -1025,8 +1024,9 @@ ct_s2i_multistage_build() { # Run the entire thing inside a subshell so that we do not leak shell options outside of the function ( + # FIXME: removed temporarily, need proper fixing # Error out if any part of the build fails - set -e + # set -e user=$(docker inspect -f "{{.Config.User}}" "$src_image") # Default to root if no user is set by the image