diff mbox series

[v3,3/5] docker: *Really* don't require rebuilding if unncessary

Message ID 20190608173622.6711-4-stephen@that.guru
State Accepted
Headers show
Series Integrate tox-docker | expand

Commit Message

Stephen Finucane June 8, 2019, 5:36 p.m. UTC
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

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(+)
diff mbox series


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
 # 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)
+set -e
 # check if db is connected
 if ! test_db_connection; then