On 5/30/25 8:56 AM, Bart Van Assche wrote:
On 5/30/25 12:54 AM, Shin'ichiro Kawasaki wrote:
@@ -695,9 +695,9 @@ _check() {
if [[ $group != "$prev_group" ]]; then
prev_group="$group"
if [[ ${#tests[@]} -gt 0 ]]; then
- if ! ( _run_group "${tests[@]}" ); then
- ret=1
- fi
+ ( _run_group "${tests[@]}" )
+ # shellcheck disable=SC2181
+ (($? != 0)) && ret=1
Is the above change necessary? This command shows that the exclamation
mark does not affect subshells:
$ bash -c '!(set -e; false; echo set -e has been ignored)'
$
(replying to my own email)
Please ignore the above comment since another email from you shows that
the exclamation mark affects called functions even if these are called
from a subshell.
Thanks,
Bart.