diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c3d8f543eb8eb97a22300d9008a4fda35e16f483..a42d03e128abb73c8dc31b379f4808b2fa1f237d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,7 +11,7 @@ env:bionic:
   image: keckj/hysop:bionic
   stage: env
   script:
-      - "sh ci/scripts/version.sh"
+      - "bash ci/scripts/version.sh"
 
 config:bionic:
   image: keckj/hysop:bionic
diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh
index f7c0ec5c6718ab5da7837dfbff38942e140b95d3..e4f8d6587b553a1c02bb4079327f53f3eb7c2f80 100755
--- a/ci/scripts/test.sh
+++ b/ci/scripts/test.sh
@@ -42,6 +42,7 @@ else
 fi
 
 if [ "${HAS_CACHE_DIR}" = true ]; then
+    mkdir -p "${HYSOP_CACHE_DIR}"
     if [ -d "${CACHE_DIR}" ]; then
         echo "Cache directory '$CACHE_DIR' was found."
         rsync -rtvu "${CACHE_DIR}/" "${HYSOP_CACHE_DIR}/"
@@ -62,7 +63,6 @@ if [ "${HAS_CACHE_DIR}" = true ]; then
             echo "No backup cache directory has been specified."
         fi
     fi
-    mkdir -p "${HYSOP_CACHE_DIR}"
     mkdir -p "${CACHE_DIR}"
 fi