errexit is not suspended in a pipeline

2023-01-11 Thread Quinn Grier
In the documentation for set -e, the Bash manual says that errexit is suspended in all but the last command of a pipeline: The shell does not exit if the command that fails is part of [...] any command in a pipeline but the last The documentation also of course says that errexit susp

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Chet Ramey
On 1/10/23 9:36 PM, Quinn Grier wrote: In the documentation for set -e, the Bash manual says that errexit is suspended in all but the last command of a pipeline:   The shell does not exit if the command that fails is part of   [...] any command in a pipeline but the last That's not w

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Quinn Grier
On 2023-01-11 06:44, Chet Ramey wrote: On 1/10/23 9:36 PM, Quinn Grier wrote: In the documentation for set -e, the Bash manual says that errexit is suspended in all but the last command of a pipeline:   The shell does not exit if the command that fails is part of   [...] any command

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Chet Ramey
On 1/11/23 4:04 PM, Quinn Grier wrote: On 2023-01-11 06:44, Chet Ramey wrote: On 1/10/23 9:36 PM, Quinn Grier wrote: In the documentation for set -e, the Bash manual says that errexit is suspended in all but the last command of a pipeline:     The shell does not exit if the command that fa

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Quinn Grier
On 2023-01-11 13:20, Chet Ramey wrote: They are not all contexts where set -e is ignored. There is a distinction between the effect of -e being ignored and the shell not exiting when a command fails. If you don't like the bash manual page wording, here's what POSIX says: "1.The failure of a

Re: errexit is not suspended in a pipeline

2023-01-11 Thread Robert Elz
What should be the real issue here is that the -e option is mostly a VERY poor idea to ever use, unless you really know how it works, and only people who are either shell implementors (and perhaps not even all of them) and very long time shell users who have been bitten by attempts to use -e, tend