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? #20

Open
max-sixty opened this issue May 29, 2022 · 1 comment
Open

Exit code? #20

max-sixty opened this issue May 29, 2022 · 1 comment

Comments

@max-sixty
Copy link

Firstly — thank you v much for rargs! I use it a lot. It's probably the most underrated "new cli tools" library.

What should the exit code of an rargs command?

Currently it seems to return successfully even if there were lots of errors in the individual commands.

I'd like to be able to understand if any command failed (e.g. did any string fail to be grepped in a file). Is there a way of doing that with the current library?

@mmirate
Copy link

mmirate commented May 30, 2022

A cursory overview of the code indicates that presently, the only cause for a nonzero exit code is an I/O error trying to read stdin.

(Changing the code to add propagation of childrens' nonzero exit codes, would require some care in order to preserve the potentially-desirable behavior that a nonzero child exit code does not cancel the remainder of the operation.)

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