summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <tscogland@llnl.gov>2015-06-09 09:07:58 -0700
committerThomas R. W. Scogland <scogland@llnl.gov>2015-06-09 19:38:35 -0700
commitb98454b8b254e5bc4932cee65be1455977335ef9 (patch)
tree42ce0f99c19f6c50bf3f5c6471749307d0347850
parente64c0f4e4e269ed204614d276e83f5ef3f128b2e (diff)
downloadspack-b98454b8b254e5bc4932cee65be1455977335ef9.tar.gz
spack-b98454b8b254e5bc4932cee65be1455977335ef9.tar.bz2
spack-b98454b8b254e5bc4932cee65be1455977335ef9.tar.xz
spack-b98454b8b254e5bc4932cee65be1455977335ef9.zip
fixing regular expression matches to use regular expression syntax instead of globbing syntax
-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 b2bcbaf6c7..b90846d28f 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -64,7 +64,7 @@ function spack {
done
# h and V flags don't require further output parsing.
- if [[ "$_sp_flags" =~ *h* || "$_sp_flags" =~ *V* ]]; then
+ if [[ (! -z "$_sp_flags") && ("$_sp_flags" =~ '.*h.*' || "$_sp_flags" =~ '.*V.*') ]]; then
command spack $_sp_flags "$@"
return
fi