From 0446e734855eebd7bf194d67bf0f588b6a6fba0f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 25 Nov 2018 09:21:42 +0100 Subject: [PATCH] BUG: too many quotes on cleaned env variables - Added quoting to handle spaces in environment values in commit 50852b33 (#1007, #1008). However, quoting is only needed for eval mode. In regular mode, quoting should not be part of the output, instead it should be done on the caller side. --- bin/foamCleanPath | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/foamCleanPath b/bin/foamCleanPath index f54575a8d9..02f7a293a6 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -226,12 +226,25 @@ done IFS="$oldIFS" # Restore initial IFS +# Output: +# +# For eval mode, add quotes around the argument. +# - eg, <. PATH="path1;path2;..."> +# +# With regular output, any quoting would be done on the caller side. +# - eg, $dirList<" if [ -n "$optVerbose" ] then echo "output: \"$dirList\"" 1>&2 fi -echo "$shellOutput\"$dirList\"" +if [ -n "$shellOutput" ] +then + echo "$shellOutput\"$dirList\"" +else + echo "$dirList" +fi #------------------------------------------------------------------------------