Compare commits

...

1 Commits

Author SHA1 Message Date
Wouter Deconinck
4bd0276ab0 setup-env.sh: if exe contains qemu, use /proc/$$/comm instead 2025-05-18 19:33:14 -05:00

View File

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