`set -e` per default
As of right now the default `CMD` for CircleCI's Docker Images is simply `CMD ["/bin/sh"]` (see here).
I propose to change this to `CMD ["/bin/sh", "-e"]` per default to ensure that multi-line commands fail when an intermediate step fails. This is such a common problem that there is a support article in "Troubleshooting and Known Issues" explaining that `set -e` should be used for multi-line commands. This change would would remove the need for setting `-e` "manually" and as such remove a potential source of errors.
It seems that this has been considered in the past- and maybe was even part of CircleCI 2.0 - but as can be seen in the linked Dockerfile this is no longer the case.
I just noticed that according to the build logs the commands are run with `/bin/bash -eo pipefail` but I'm unable to determine where this "comes from". If that's the case please ignore this request.
Attachments Open full size
Please ignore this request, I've verified that -e is set by default although I'm unsure where exactly this happens.
Attachments Open full size