summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/spack/setup-env.csh4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh
index 14dcee56b7..d091caf8dd 100644
--- a/share/spack/setup-env.csh
+++ b/share/spack/setup-env.csh
@@ -62,9 +62,9 @@ if (! $?SPACK_PYTHON) then
setenv SPACK_PYTHON ""
endif
foreach cmd ("$SPACK_PYTHON" python3 python python2)
- command -v "$cmd" >& /dev/null
+ set status=`which "$cmd" >& /dev/null; echo $?`
if ($status == 0) then
- setenv SPACK_PYTHON `command -v "$cmd"`
+ setenv SPACK_PYTHON `which "$cmd"`
break
endif
end