diff options
author | Bert Wesarg <Bert.Wesarg@googlemail.com> | 2018-10-29 19:16:55 +0100 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-10-29 11:16:55 -0700 |
commit | c43689deb06218b748c9d56aca545a34d6f50296 (patch) | |
tree | b271b15ea74d0a88e3eed2d57d5387f384ce9018 /share/spack | |
parent | be5c92f7cd4eb6f246b32f9f9e8893904fd18142 (diff) | |
download | spack-c43689deb06218b748c9d56aca545a34d6f50296.tar.gz spack-c43689deb06218b748c9d56aca545a34d6f50296.tar.bz2 spack-c43689deb06218b748c9d56aca545a34d6f50296.tar.xz spack-c43689deb06218b748c9d56aca545a34d6f50296.zip |
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'.
Diffstat (limited to 'share/spack')
-rwxr-xr-x | share/spack/setup-env.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 97de19e4c9..9f2bb2618c 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -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) |