[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff_opts initialization missing in examples/test
From: |
Martin Rehak |
Subject: |
Re: diff_opts initialization missing in examples/test |
Date: |
Tue, 24 Nov 2020 10:30:51 +0100 |
User-agent: |
astroid/0.15.0 (https://github.com/astroidmail/astroid) |
Hi Akim,
thank you!
Regards
--
Martin
On November 20, 2020 6:42 am Akim Demaille wrote:
> Hi Martin,
>
> Thanks, I'm installing this:
>
> commit 2ca158c893ed6a568c582d9c006bdc209a63267c
> Author: Martin Rehak <martin.rehak@oracle.com>
> Date: Wed Nov 18 09:10:01 2020 +0100
>
> examples: avoid "unbound variable" errors
>
> When the shell option `nounset` is set, we may get "unbound variable"
> errors.
>
> https://urldefense.com/v3/__https://lists.gnu.org/r/bug-bison/2020-11/msg00013.html__;!!GqivPVa7Brio!MarTsgRGOfZ4UnRDfV_ftpMB3Yoq15rtjdF5qD4d6RZLrkzvxaXwafo7hOZPFyuU1A$
>
>
> * examples/test (diff_opts): Be sure to initialize it.
>
> diff --git a/examples/test b/examples/test
> index 81076701..7590e128 100755
> --- a/examples/test
> +++ b/examples/test
> @@ -37,6 +37,7 @@ strip_prompt=false
> # If diff supports --strip-trailing-cr, use it, to avoid EOL issues
> # when testing Java programs on Windows.
> echo "checking for diff --strip-trailing-cr..."
> +diff_opts=
> if diff --strip-trailing-cr "$1" "$1"; then
> diff_opts=--strip-trailing-cr
> fi
>
>