Message ID | 20190608173622.6711-4-stephen@that.guru |
---|---|
State | Accepted |
Headers | show |
Series | Integrate tox-docker | expand |
diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh index 32f7132a..8a8c99a5 100755 --- a/tools/docker/entrypoint.sh +++ b/tools/docker/entrypoint.sh @@ -68,6 +68,7 @@ EOF fi # check if we need to rebuild because requirements changed +set +e for x in /tmp/requirements-*.txt; do if ! cmp $x ~/patchwork/$(basename $x); then cat << EOF @@ -80,6 +81,7 @@ EOF diff -u $x ~/patchwork/$(basename $x) fi done +set -e # check if db is connected if ! test_db_connection; then
In commit 0b5b4e8cb3d0, we modified the docker entrypoint so it would stop exiting whenever requirements changes were detected, instead opting to allow the user to decide if things should be rebuilt or not. Unfortunately the use of the '-e' option for the 'set' builtin means all commands that fail will result in the script exiting. We don't want this here. Fix the issue by temporarily setting '+e' before and after this command, resolving the issue. Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 0b5b4e8cb3d0 ("docker: Don't require rebuilding if unnecessary") --- tools/docker/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+)