Newlines in ERR trap affect caller 0 line number

2021-10-31 Thread Quinn Grier
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-musl Compiler: gcc Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Linux e4cb51356521 5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 Linux Mac

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 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

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