diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c1391b1fbb9eff8b6e5b7ec3cc4a491d9834b72b..9510b8a6cf55a1f2553d473e672efe0a337602bc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -153,14 +153,13 @@ spack:install_compilers:
       cat compiler_definitions.yaml
 
     - |
-      while read -r compiler_hash
-      do
+      for compiler_hash in $(echo ${hashes})
         echo "spack/bin/spack location -i ${compiler_hash}"
         location=$(spack/bin/spack location -i ${compiler_hash})
 
         echo "spack/bin/spack compiler find --scope system ${location}"
         spack/bin/spack compiler find --scope system $(spack/bin/spack location -i ${compiler_hash})
-      done <<< $(echo ${hashes})
+      done
 
     - spack/bin/spack -e . config blame compilers