From b98454b8b254e5bc4932cee65be1455977335ef9 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 9 Jun 2015 09:07:58 -0700 Subject: fixing regular expression matches to use regular expression syntax instead of globbing syntax --- share/spack/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-60-g2f50