When I run the find command with an -exec subcommand that fails, find returns a 0 exit code:
$ find . -iname '*.txt' -exec ls foo \;
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
ls: foo: No such file or directory
$ echo $?
0
Is there any way to make find fail if any of its subcommands fail?