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

allow setting the exit code #15

Closed
benwbooth opened this issue Feb 6, 2014 · 2 comments
Closed

allow setting the exit code #15

benwbooth opened this issue Feb 6, 2014 · 2 comments

Comments

@benwbooth
Copy link

It would be useful to be able to signify an exit code from within the script using a global variable or something, such as *exit-code*. Then when lein exec is called, the script sets the variable, and when lein exec exits, it uses the value of the variable as its exit status.

@kumarshantanu
Copy link
Owner

Does (System/exit 1) work for you? You can use any error code you want.

@benwbooth
Copy link
Author

Ah, I discovered that leiningen already supports this behavior with the leiningen.core.main/exit function.

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

2 participants