summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-12-17 23:01:46 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-12-17 23:01:46 -0800
commita173324069c0d5bea8ae8730638ca434a0395f78 (patch)
tree9d7ec28aacc5bdbf2e22f703c1aaee79e84f378d /share
parentffd1d95806d3534f4961941553d786180c38a4f1 (diff)
parent3ce99cf4e18b599a42041a486b82498a0f43a488 (diff)
downloadspack-a173324069c0d5bea8ae8730638ca434a0395f78.tar.gz
spack-a173324069c0d5bea8ae8730638ca434a0395f78.tar.bz2
spack-a173324069c0d5bea8ae8730638ca434a0395f78.tar.xz
spack-a173324069c0d5bea8ae8730638ca434a0395f78.zip
Merge pull request #205 from trws/shell-arg-handling-fix
fix for the shell arg handling issues
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index c96a94195d..9f4ddd3faf 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -56,6 +56,12 @@
# spack dotfiles.
########################################################################
function spack {
+ # save raw arguments into an array before butchering them
+ args=()
+ for a in "$@"; do
+ # yup, this is awful, blame bash2 compat
+ args=("${args[@]}" "$a")
+ done
# accumulate initial flags for main spack command
_sp_flags=""
while [[ "$1" =~ ^- ]]; do
@@ -116,7 +122,7 @@ function spack {
esac
;;
*)
- command spack $_sp_flags $_sp_subcommand $_sp_spec
+ command spack "${args[@]}"
;;
esac
}