diff options
author | Ray Huang <47706097+ExplorerRay@users.noreply.github.com> | 2024-10-03 01:15:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 19:15:35 +0200 |
commit | 470774687d1bab90856a4053982fc1e39c30c9d3 (patch) | |
tree | 7d648cba4a631490e7549c02b57982b381ed6055 /share | |
parent | 20aec1536a7744949b69f32d0773a16a820b0481 (diff) | |
download | spack-470774687d1bab90856a4053982fc1e39c30c9d3.tar.gz spack-470774687d1bab90856a4053982fc1e39c30c9d3.tar.bz2 spack-470774687d1bab90856a4053982fc1e39c30c9d3.tar.xz spack-470774687d1bab90856a4053982fc1e39c30c9d3.zip |
fix 'command -v' not in csh (#45845)
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/setup-env.csh | 4 |
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 |