summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-02-13 20:07:09 -0600
committerGitHub <noreply@github.com>2020-02-13 20:07:09 -0600
commite0dfc3ddbf4bc92ddf206cbc3e55ace32928c174 (patch)
tree28377bd10c1d825dbd11d6a724143066a8a21c37 /share
parent8beb42e7490a2210070efc78e5ea5cb733278789 (diff)
downloadspack-e0dfc3ddbf4bc92ddf206cbc3e55ace32928c174.tar.gz
spack-e0dfc3ddbf4bc92ddf206cbc3e55ace32928c174.tar.bz2
spack-e0dfc3ddbf4bc92ddf206cbc3e55ace32928c174.tar.xz
spack-e0dfc3ddbf4bc92ddf206cbc3e55ace32928c174.zip
Fix shell detection: zsh5 -> zsh (#14858)
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 207e9c4a80..c3d9ef260c 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -212,7 +212,8 @@ _spack_determine_shell() {
# If procfs is present this seems a more reliable
# way to detect the current shell
_sp_exe=$(readlink /proc/$$/exe)
- basename ${_sp_exe}
+ # Shell may contain number, like zsh5 instead of zsh
+ basename ${_sp_exe} | tr -d '0123456789'
elif [ -n "${BASH:-}" ]; then
echo bash
elif [ -n "${ZSH_NAME:-}" ]; then