Skip to content
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

Add set -e on main and preprocess.sh #5

Open
soichih opened this issue May 21, 2021 · 0 comments
Open

Add set -e on main and preprocess.sh #5

soichih opened this issue May 21, 2021 · 0 comments

Comments

@soichih
Copy link

soichih commented May 21, 2021

When something goes wrong inside preprocess.sh, the script will still return exit code 0 and main will continue running making it a bit more difficult to diagnose problem. I recommend adding the following at the top of every bash script.

set -e
set -x

set -e makes sure that script will exist as soon as something goes wrong, and set -x echos out all command executed in the script to help diagnose problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant