Some trial and error to make sure it works reliably.
* remove test_retcode
* debug local bash settings
* set errexit explicitly in subshell
* set errexit also in the subshell in parenthesis
* debugging
* more debugging (exit code of sh)
* is the venv subshell returning exit 1?
* what if we remove the additional subshell?
* then we need to unquote the command
* if statement needs test command quoted
* simple if statement
* echo command needs to be removed of course
* remove debug statements
* check if setting errexit here is needed
* these settings can be removed
At this point ("before") the shell already has errexit set.
* setting errexit in the sh invocation is needed
This is not inherited, so it's good to specify it.
* just double checking that the subshell doesn't exit
* use solution from fvue.nl
* Solution doesn't seem to work, even popd is run
So now I'm putting back the if statement, it seems
to be the simplest and most effective solution.
* add a comment
* prove that errexit is necessary
* errexit is indeed needed for chaining