Different distributions, and in particular the BSD Unix family, do not all place the bash interpreter in
/bin/env bash is used instead then all Unix and Linux of which I have knowledge will be able to find the interpreter.
On systems where
/bin/bash does not exist the script simply fails without giving any indication of what has happened.
#!/bin/env bash -e doesn’t work, due to the way argument parsing happens:
/bin/env: ‘bash -e’: No such file or directory
/bin/env: use -[v]S to pass options in shebang lines
and similarly with
/usr/bin/env bash -e. The usual way would be to
set -e as the first command in the script.
I’m led to believe that
/usr/bin/env is more standard. So, 3.6.2 will have that. Thanks for reporting the problem.