This is not a bug, although some might disagree with the current behavior of bash.
With a command like 'yes | grep -q .', because the grep terminates early and the yes is writing past the end of the pipe buffer, the yes process is _always_ terminated with a SIGPIPE signal (which translates to a return value of 141). Combined with the pipefail option, the whole command is considered to have failed.
pipefail should be used scarcely, that's why it is not enabled by default.
This is not a bug, although some might disagree with the current behavior of bash.
With a command like 'yes | grep -q .', because the grep terminates early and the yes is writing past the end of the pipe buffer, the yes process is _always_ terminated with a SIGPIPE signal (which translates to a return value of 141). Combined with the pipefail option, the whole command is considered to have failed.
pipefail should be used scarcely, that's why it is not enabled by default.