diff --git a/install-mpsd-software-environment.py b/install-mpsd-software-environment.py
index 642e13cf397c34f13c94b7cf0309da4ea5d2dfdf..0cd7e08f06c7799bd500b90b3d3d7164a14094e8 100755
--- a/install-mpsd-software-environment.py
+++ b/install-mpsd-software-environment.py
@@ -253,7 +253,7 @@ def install_environment(
                 .replace("_mpsd_spack_ver_", f"_{mpsd_release}_")
             )
             subprocess.run(
-                f"bash {spack_setup_script} {' '.join(install_flags)} {toolchain} | tee -a {install_log_file} 2>&1",
+                f"bash {spack_setup_script} {' '.join(install_flags)} {toolchain} 2>&1 | tee -a {install_log_file} ",
                 shell=True,
             )