Fix shell detection: zsh5 -> zsh (#14858)

This commit is contained in:
Adam J. Stewart 2020-02-13 20:07:09 -06:00 committed by GitHub
parent 8beb42e749
commit e0dfc3ddbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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