Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Failed pipeline doesn't err_exit/return if complex command last
Le 06/07/2023 à 01:18, Johan Grande a écrit :
With `set -eo pipefail`, a failing pipeline that ends in a complex
command will have non-zero status but not exit the script (or a function
with err_return):
Note: This happens even if the complex command is inside a function:
f() { { true; true } }
false | f
echo $?
=> prints "1", exits with 0
f() { true }
false | f
echo $?
=> no output, exits with 1
--
Johan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author