[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: do-release-commit-and-tag: fix typo
From: |
Stefano Lattarini |
Subject: |
Re: FYI: do-release-commit-and-tag: fix typo |
Date: |
Thu, 05 Jul 2012 17:13:40 +0200 |
Hi Akim, Jim.
Just a minor correction about your "set -e" interpretation ...
On 07/05/2012 04:53 PM, Jim Meyering wrote:
> Akim Demaille wrote:
>> Le 5 juil. 2012 à 15:24, Akim Demaille a écrit :
>>
>>> test "$(sed -n 3p NEWS)" = "$noteworthy_stub" \
>>> && die 'line 3 of NEWS looks fishy!'
>>
>> Well, while I agree in general, I don't have the same
>> feeling in this case, for two reasons. The first one
>> being that under set -e, && propagate the failure,
>> and the script will die. || is safer than && when
>
> This script doesn't use set -e.
> I'd say that having to limit such use of "&&" is a good reason
> not to use "set -e".
>
But "false && something" causes no problem under "set -e":
$ sh -e -c 'false && exit 1; echo OK'
OK
otherwise about one third of the Automake testsuite would spuriously
fail with regularity :-)
And I'm pretty sure that POSIX mandates this behaviour somewhere...
Regards,
Stefano
- FYI: do-release-commit-and-tag: fix typo, Akim Demaille, 2012/07/05
- Re: FYI: do-release-commit-and-tag: fix typo, Jim Meyering, 2012/07/05
- Re: FYI: do-release-commit-and-tag: fix typo, Akim Demaille, 2012/07/05
- Re: FYI: do-release-commit-and-tag: fix typo, Akim Demaille, 2012/07/05
- Re: FYI: do-release-commit-and-tag: fix typo, Eric Blake, 2012/07/05
- Re: FYI: do-release-commit-and-tag: fix typo, Akim Demaille, 2012/07/06