ash doesn't errexit correctly
❯ docker run --rm -ti alpine:3.5 ash / # set -e / # (exit 42) || (ret=$?; echo 'oh no'; exit $ret) oh no / # echo $? 42 / # # wat / # 42 ash: 42: not found
but it works in bash/dash
❯ docker run --rm -ti ubuntu
root@9a46fb639b6b:/# dash
# set -e
# (exit 42) || (ret=$?; echo 'oh no'; exit $ret)
oh no
root@9a46fb639b6b:/# exit
exit
(from redmine: issue id 6713, created on 2017-01-20)