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

Early exit in shell scripts #231

Open
simleo opened this issue Oct 6, 2017 · 2 comments
Open

Early exit in shell scripts #231

simleo opened this issue Oct 6, 2017 · 2 comments
Assignees

Comments

@simleo
Copy link
Member

simleo commented Oct 6, 2017

Most (probably all) shell scripts should exit as soon as a command fails, most notably examples/run_all. Check all shell scripts and use set -e as appropriate.

@simleo simleo self-assigned this Oct 6, 2017
@ilveroluca
Copy link
Member

For run_all, one could argue against that. If one example fails to run (potentially because of a bug) the others may still work.

@simleo
Copy link
Member Author

simleo commented Oct 6, 2017

We are currently using it as an integration test, part of the Travis build, where the question is "is everything OK?". In this case it's better to have the "no" answer ASAP. OTOH, being able to answer "how many examples are working?" is also useful. We can make the early exit behavior optional so that it can be set according to the intended usage.

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

No branches or pull requests

2 participants