From 226413a9705aa8119a0b8f66418b7e02ab76cb65 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Sun, 23 Feb 2020 09:41:07 -0800 Subject: CI: fix can_pull causing script to exit with code 1 Error handling is performed inside can_pull so the callers of the function don't always check its exit code. Because set -e present, if can_pull returns 1, bash would consider that function a failed call and thus exit the entire script with code 1. That, in turn, would cause the CI job to fail. --- scripts/check_dockerfiles.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_dockerfiles.sh b/scripts/check_dockerfiles.sh index 95c18cb..88cb7cc 100755 --- a/scripts/check_dockerfiles.sh +++ b/scripts/check_dockerfiles.sh @@ -115,7 +115,7 @@ if git diff --quiet "${prev_commit}" -- docker/venv.Dockerfile Pipfile*; then if ! can_pull venv docker/venv.Dockerfile Pipfile*; then # Venv image can't be pulled so it needs to be built. # Therefore, the base image is needed too. - can_pull base docker/base.Dockerfile + can_pull base docker/base.Dockerfile || true fi else echo \ @@ -123,5 +123,5 @@ else "the venv image will be built." # Though base image hasn't changed, it's still needed to build the venv. - can_pull base docker/base.Dockerfile + can_pull base docker/base.Dockerfile || true fi -- cgit v1.2.3