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

Fix exit-status codes for Guard #216

Merged
merged 3 commits into from
Jan 5, 2012
Merged

Conversation

Maher4Ever
Copy link
Contributor

While using Guard I always noticed that it exits with status code "1" even when using the interactor to stop it (My terminal shows failure status codes).
It would be nice to let Guard exit with the right status codes because it is a tool used by a lot of developers.

I've changed the way Guard exits in this commit. Guard doesn't exit the program no more when calling Guard.stop. This has the advantage of being able to use Guard.stop programmatically knowing it won't kill the process.

I felt that the interactor should be the one to exit Guard's process, so now it will call Kernel::exit after it stops all running guards.

When there is an interrupt, Guard will still stop all guards, but now it will use Kernel::abort to return a failure status-code.

The commits will apply nicely and the specs pass: http://travis-ci.org/#!/Maher4Ever/guard

@rymai
Copy link
Member

rymai commented Jan 3, 2012

Cool thanks! 🎁

@thibaudgg
Copy link
Member

Great, thanks!

@thibaudgg
Copy link
Member

@Maher4Ever this is ready to be merged?

@Maher4Ever
Copy link
Contributor Author

Yes it is. Just merge the last commit though... the rest is already in Guard's master branch.

thibaudgg added a commit that referenced this pull request Jan 5, 2012
Fix exit-status codes for Guard
@thibaudgg thibaudgg merged commit 60cb69c into guard:master Jan 5, 2012
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

Successfully merging this pull request may close these issues.

4 participants