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

Exit code not correct #25

Closed
jsseidel opened this issue May 10, 2019 · 1 comment
Closed

Exit code not correct #25

jsseidel opened this issue May 10, 2019 · 1 comment

Comments

@jsseidel
Copy link
Collaborator

There are points in mktechdocs where the exit code doesn't work as expected.

After while loops, instead of this:

[[ $? != 0 ]] && exit $?

You need this to preserve the exit code. At the point of the exit, you'll get the exit code of the [[ ]] statement (0) instead of the the exit from the while loop.

RV=$? ; [[ $RV != 0 ]] && exit $RV
jsseidel pushed a commit that referenced this issue May 10, 2019
@jsseidel
Copy link
Collaborator Author

Fixed and pushed.

jsseidel pushed a commit that referenced this issue May 11, 2019
jsseidel pushed a commit that referenced this issue May 11, 2019
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