summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <christoph.junghans@gmail.com>2017-09-12 13:17:20 -0600
committerscheibelp <scheibel1@llnl.gov>2017-09-12 12:17:20 -0700
commit80ac61339164ac8044fafb641403384cb54ae3e7 (patch)
treeadbb642a874c353d9c5e4aded6846ec3b22072e4
parent90d50a0cee912fc1da43f617a166d0104c41939f (diff)
downloadspack-80ac61339164ac8044fafb641403384cb54ae3e7.tar.gz
spack-80ac61339164ac8044fafb641403384cb54ae3e7.tar.bz2
spack-80ac61339164ac8044fafb641403384cb54ae3e7.tar.xz
spack-80ac61339164ac8044fafb641403384cb54ae3e7.zip
Shell detection: filter preceding "-"
On OSX, the shell detection code may get a preceding dash, like "-bash". This adds a filter to remove it.
-rwxr-xr-xshare/spack/setup-env.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 8cf54661d8..74820ecb93 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -202,7 +202,7 @@ export SPACK_ROOT=${_sp_prefix}
# Determine which shell is being used
#
function _spack_determine_shell() {
- ps -p $$ | tail -n 1 | awk '{print $4}' | xargs basename
+ ps -p $$ | tail -n 1 | awk '{print $4}' | sed 's/^-//' | xargs basename
}
export SPACK_SHELL=$(_spack_determine_shell)