I've implemented the suggestion I made in master: New option ~ob-shell-return-value-is-exit-status~ When set to =t=, consider the return value of a shell source code block is the exit status of its last command. The default for this option is =nil=, i.e. the return value of a shell block is the output of the commands. You can turn this on individual blocks by setting the header argument =:value-is-exit-status= to =t=.
Please test and let me know if it works. Thanks for bringing this up! -- Bastien