mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
examples: avoid "unbound variable" errors
When the shell option `nounset` is set, we may get "unbound variable" errors. https://lists.gnu.org/r/bug-bison/2020-11/msg00013.html * examples/test (diff_opts): Be sure to initialize it.
This commit is contained in:
committed by
Akim Demaille
parent
336089123f
commit
2ca158c893
@@ -37,6 +37,7 @@ strip_prompt=false
|
|||||||
# If diff supports --strip-trailing-cr, use it, to avoid EOL issues
|
# If diff supports --strip-trailing-cr, use it, to avoid EOL issues
|
||||||
# when testing Java programs on Windows.
|
# when testing Java programs on Windows.
|
||||||
echo "checking for diff --strip-trailing-cr..."
|
echo "checking for diff --strip-trailing-cr..."
|
||||||
|
diff_opts=
|
||||||
if diff --strip-trailing-cr "$1" "$1"; then
|
if diff --strip-trailing-cr "$1" "$1"; then
|
||||||
diff_opts=--strip-trailing-cr
|
diff_opts=--strip-trailing-cr
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user