Bastien <b...@gnu.org> writes: > Then we need to fix ob-shell.el to return the exit code of the last > command when :results is not set or explicitely set to "value". Is > this something you want to look at? > > Maybe by adding a "echo $?" instruction at the end of shell blocks > or by wrapping the code into something that returns the result? > > I think it will come as a surprise for many users, since the natural > expectation seems to get the "output", disregarding bash notion of a > "return value".
Maybe ob-shell.sh could have an option ob-shell-value-is-exit-status set to nil by default to stick with the current behavior, but letting users get the exit status as the value if they want to. WDYT? -- Bastien