New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug where docker-entrypoint.sh exits w/o notice #352

Merged
merged 1 commit into from May 20, 2018

Conversation

Projects
None yet
2 participants
@Strubbl
Contributor

Strubbl commented May 15, 2018

This commit fixes a nasty bug, where the docker-entrypoint.sh silently
exits without any error message. The test for a lock file can fail and
due to the set -e at the beginning of the file the bash script exists
without starting the paperless application.
It is fixed by moving the check for the existence of the lock file into
the if statement, where the set -e does not trigger an exit in case
the statement fails (see https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html in the section for parameter -e).

Additionally this commit enables the script to trap exit signals and in
that case deletes the lock file.

fix bug where docker-entrypoint.sh exits w/o notice
This commit fixes a nasty bug, where the docker-entrypoint.sh silently
exits without any error message. The test for a lock file can fail and
due to the `set -e` at the beginning of the file the bash script exists
without starting the paperless application.
It is fixed by moving the check for the existence of the lock file into
the if statement, where the `set -e` does not trigger an exit in case
the statement fails.

Additionally this commit enables the script to trap exit signals and in
that case deletes the lock file.
@danielquinn

This comment has been minimized.

Owner

danielquinn commented May 20, 2018

The force is strong with your Bash skills friend. That's a level of kung-foo well beyond me. Thanks for finding & fixing this!

@danielquinn danielquinn merged commit 24bdc07 into danielquinn:master May 20, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 63.864%
Details

danielquinn added a commit that referenced this pull request May 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment