Fix shell detection: zsh5 -> zsh (#14858)
This commit is contained in:
parent
8beb42e749
commit
e0dfc3ddbf
@ -212,7 +212,8 @@ _spack_determine_shell() {
|
|||||||
# If procfs is present this seems a more reliable
|
# If procfs is present this seems a more reliable
|
||||||
# way to detect the current shell
|
# way to detect the current shell
|
||||||
_sp_exe=$(readlink /proc/$$/exe)
|
_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
|
elif [ -n "${BASH:-}" ]; then
|
||||||
echo bash
|
echo bash
|
||||||
elif [ -n "${ZSH_NAME:-}" ]; then
|
elif [ -n "${ZSH_NAME:-}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user