setup-env.sh: if exe contains qemu, use /proc/$$/comm instead
This commit is contained in:
parent
8ba4b3c103
commit
4bd0276ab0
@ -232,6 +232,10 @@ _spack_determine_shell() {
|
||||
# If procfs is present this seems a more reliable
|
||||
# way to detect the current shell
|
||||
_sp_exe=$(readlink /proc/$$/exe)
|
||||
# Qemu emulation has _sp_exe point to the emulator
|
||||
if [ "${_sp_exe##*qemu*}" != "${_sp_exe}" ]; then
|
||||
_sp_exe=$(cat /proc/$$/comm)
|
||||
fi
|
||||
# Shell may contain number, like zsh5 instead of zsh
|
||||
basename ${_sp_exe} | tr -d '0123456789'
|
||||
elif [ -n "${BASH:-}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user