setup-env: Avoid different output format of ps
(#9629)
setup-env includes a call to 'ps' to determine what shell is being used. 'ps' can be instructed to use a different default output format via the 'PS_FORMAT' env variable. Thus unset this variable before calling 'ps'.
This commit is contained in:
parent
be5c92f7cd
commit
c43689deb0
@ -199,7 +199,7 @@ export SPACK_ROOT=${_sp_prefix}
|
||||
# Determine which shell is being used
|
||||
#
|
||||
function _spack_determine_shell() {
|
||||
ps -p $$ | tail -n 1 | awk '{print $4}' | sed 's/^-//' | xargs basename
|
||||
PS_FORMAT= ps -p $$ | tail -n 1 | awk '{print $4}' | sed 's/^-//' | xargs basename
|
||||
}
|
||||
export SPACK_SHELL=$(_spack_determine_shell)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user