Shell detection: filter preceding "-"
On OSX, the shell detection code may get a preceding dash, like "-bash". This adds a filter to remove it.
This commit is contained in:
parent
90d50a0cee
commit
80ac613391
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user