Installed in master.
commit 2d7e7438024e47650c3a0c9f5f313c6eb6acae2d
Author: Akim Demaille <[email protected]>
Date: Sun Sep 2 09:20:06 2018 +0200
examples: beware of shell portability issues
Some shells don't grok `local var=$val` very well: they need the rhs
to be quoted.
./examples/test: 66: local: you.,: bad variable name
FAIL examples/variant.test (exit status: 2)
Reported by Étienne Renault.
* examples/test (run): Quote the values in 'local' assignments.
diff --git a/THANKS b/THANKS
index c655e3c6..7a69245f 100644
--- a/THANKS
+++ b/THANKS
@@ -51,6 +51,7 @@ Didier Godefroy [email protected]
Efi Fogel [email protected]
Enrico Scholz [email protected]
Eric Blake [email protected]
+Étienne Renault [email protected]
Evgeny Stambulchik [email protected]
Fabrice Bauzac [email protected]
Ferdinand Thiessen [email protected]
diff --git a/examples/test b/examples/test
index a2439213..e4ffa259 100755
--- a/examples/test
+++ b/examples/test
@@ -60,10 +60,10 @@ cd $$.dir
run ()
{
# Expected exit status.
- local sta_exp=$1
+ local sta_exp="$1"
shift
# Expected output.
- local out_exp=$1
+ local out_exp="$1"
shift
# Effective exit status.
local sta_eff=0