diff options
-rw-r--r-- | .github/workflows/unit_tests.yaml | 2 | ||||
-rwxr-xr-x | bin/spack | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index e45e1aad1b..804d7fa125 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -283,8 +283,6 @@ jobs: useradd spack-test chown -R spack-test . - name: Run unit tests - env: - SPACK_PYTHON: /usr/libexec/platform-python shell: runuser -u spack-test -- bash {0} run: | source share/spack/setup-env.sh @@ -11,7 +11,8 @@ # See https://stackoverflow.com/a/47886254 """:" # prefer SPACK_PYTHON environment variable, python3, python, then python2 -for cmd in "${SPACK_PYTHON:-}" python3 python python2; do +SPACK_PREFERRED_PYTHONS="python3 python python2 /usr/libexec/platform-python" +for cmd in "${SPACK_PYTHON:-}" ${SPACK_PREFERRED_PYTHONS}; do if command -v > /dev/null "$cmd"; then export SPACK_PYTHON="$(command -v "$cmd")" exec "${SPACK_PYTHON}" "$0" "$@" |