On 3/24/17 7:57 AM, Greg Wooledge wrote:
> On Thu, Mar 23, 2017 at 10:14:01PM -0700, Pádraig Brady wrote:
>> OK let's not derail this into a discussion specific to errexit.
>> Can we please improve things?
>> You say to not use errexit, and instead use `|| exit 1` where appropriate.
>> In that case
On 3/23/17 3:27 PM, Jay Freeman (saurik) wrote:
> (Potentially of mild interest is this thread on Hacker News from earlier
> today, where multiple people are suggesting the usage of "set -e" along with
> "set -u" and "set -o pipefile".)
>
> https://news.ycombinator.com/item?id=13940322
It's us
On 24/03/17 04:57, Greg Wooledge wrote:
> On Thu, Mar 23, 2017 at 10:14:01PM -0700, Pádraig Brady wrote:
>> OK let's not derail this into a discussion specific to errexit.
>> Can we please improve things?
>> You say to not use errexit, and instead use `|| exit 1` where appropriate.
>> In that case
On Thu, Mar 23, 2017 at 10:14:01PM -0700, Pádraig Brady wrote:
> OK let's not derail this into a discussion specific to errexit.
> Can we please improve things?
> You say to not use errexit, and instead use `|| exit 1` where appropriate.
> In that case can we fix this case?
>
> set -o pipefail
>
On 23/03/17 09:34, Greg Wooledge wrote:
> On Thu, Mar 23, 2017 at 08:50:45AM -0700, Pádraig Brady wrote:
>> I was bitten by this again when combined with set -e.
>> I.E. this script doesn't finish:
>>
>> #!/bin/bash
>> set -o errexit
>> set -o pipefail
>> yes | head -n1
>> echo finished
>>
>> That
> Errexit (a.k.a. set -e) is horrible,
> and you should not be using it in any new shell scripts you write.
> It exists solely for support of legacy scripts.
Wow. For those of us who don't know this, what should we be using instead? Is
using a trap on ERR any better? Is your suggestion that || ex
On Thu, Mar 23, 2017 at 07:27:19PM +, Jay Freeman (saurik) wrote:
> > Errexit (a.k.a. set -e) is horrible,
> > and you should not be using it in any new shell scripts you write.
> > It exists solely for support of legacy scripts.
>
> Wow. For those of us who don't know this, what should we be
On Thu, Mar 23, 2017 at 08:50:45AM -0700, Pádraig Brady wrote:
> I was bitten by this again when combined with set -e.
> I.E. this script doesn't finish:
>
> #!/bin/bash
> set -o errexit
> set -o pipefail
> yes | head -n1
> echo finished
>
> That makes the errexit and pipefail options decidedly l
On 15/02/15 14:14, Pádraig Brady wrote:
> On 15/02/15 21:59, Daniel Colascione wrote:
>> On 02/15/2015 01:48 PM, Chet Ramey wrote:
>>> On 2/13/15 12:19 PM, Pádraig Brady wrote:
I was expecting bash to handle SIGPIPE specially here,
as in this context it's informational rather than an indi
On 15/02/15 21:59, Daniel Colascione wrote:
> On 02/15/2015 01:48 PM, Chet Ramey wrote:
>> On 2/13/15 12:19 PM, Pádraig Brady wrote:
>>> I was expecting bash to handle SIGPIPE specially here,
>>> as in this context it's informational rather than an indication of error.
>>
>> I don't agree. It's a
On 02/15/2015 01:48 PM, Chet Ramey wrote:
> On 2/13/15 12:19 PM, Pádraig Brady wrote:
>> I was expecting bash to handle SIGPIPE specially here,
>> as in this context it's informational rather than an indication of error.
>
> I don't agree. It's a fatal signal whose default disposition is to
> ter
On 2/13/15 12:19 PM, Pádraig Brady wrote:
> I was expecting bash to handle SIGPIPE specially here,
> as in this context it's informational rather than an indication of error.
I don't agree. It's a fatal signal whose default disposition is to
terminate a process, which is exactly what happens in y
12 matches
Mail list logo