Catching errors in pipes
Sébastien Hinderer <[email protected]> Tue, 5 Dec 2023 13:43:30 +0100
| Newsgroups | gmane.comp.gnu.make.general |
|---|---|
| Message-ID | <ZW8a8oNoYuGI2nvK@jnana> |
Dear all, Is there a recommended way to catch errors in pipelines of coommands that are used in recipes, please? If so, how backward-compatible are they? I saw the .SHELLFLAGS variable but also found a bug report saying that its content is passed to the shell as one single argument. Is it thus mandatory to prefix every pipeline with set -o pipefail; or is there a more global way to get the desired behaviour? Many thanks in advance for any help, Sébastien.