diff --git a/platforms/common/spack_utils.sh b/platforms/common/spack_utils.sh
index 0976792d521b368a7a239d6a9a1bba9477c42056..47132ebef01770726c42f20988a6b6ff11cea685 100644
--- a/platforms/common/spack_utils.sh
+++ b/platforms/common/spack_utils.sh
@@ -30,7 +30,7 @@ function _install_spack() {
   if [[ $(spack compiler info ${SPACK_COMPILER}) ]]; then
     echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})"
   else
-    if $(spack load ${SPACK_COMPILER}); then
+    if $(spack location --install-dir ${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"