From c43689deb06218b748c9d56aca545a34d6f50296 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Mon, 29 Oct 2018 19:16:55 +0100 Subject: 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'. --- share/spack/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') 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) -- cgit v1.2.3-60-g2f50