diff --git a/platforms/common/spack_utils.sh b/platforms/common/spack_utils.sh
index 3372a90da627971679263089d0e0806eec44b433..6ed36cb91c8bc4fdbb4d93f732aa5430cf977e4b 100644
--- a/platforms/common/spack_utils.sh
+++ b/platforms/common/spack_utils.sh
@@ -31,7 +31,7 @@ EOF
   if [[ $(spack compiler info ${SPACK_COMPILER}) ]]; then
     echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})"
   else
-    if [[ $(spack load ${SPACK_COMPILER}) ]]; then
+    if $(spack load ${SPACK_COMPILER}); then
       echo "found the compiler ${SPACK_COMPILER} as a spack package at $(spack location --install-dir $SPACK_COMPILER)"
     else
       echo "could not find compiler, will now try to install it... this may take a while"