-
Notifications
You must be signed in to change notification settings - Fork 111
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
Migrate away from exitcode #177
Comments
We are looking at our default recommendation being the proc-exit crate. I just updated it for the |
Sounds good, but proc-exit is unnecessarily complicated and opinionated if all you want are the exit codes. sysexits should still at least be mentioned as a "here's the crate that just has exit codes if you want that" thing. BTW, sysexit and sysexits are different. Just want to make sure we're talking about the same thing. |
Maybe but I disagree with the choice of sysexits
|
I'm not sure I understand. You can always just cast it to a u8 and then do whatever your want. Or convert it to std::process::ExitCode. Also,
True but then why mention exitcode at all? Seems like a red herring argument. |
What does exitcode have to do with this? |
It's recommended here: https://rust-cli.github.io/book/in-depth/exit-code.html |
Yeah actually let me just make a PR. |
Yes and I have no problem removing exitcode in that document but it would be to replace it with proc-exit. |
Hmmm, I just disagree. The opinionated thing should be in https://rust-cli.github.io/book/tutorial/errors.html whereas https://rust-cli.github.io/book/in-depth/exit-code.html should provide just the exit codes. Or really, exit-code.html should be deleted in favor of an all-encompassing solution inside errors.html that is capable of returning arbitrary exit codes upon error. proc-exit does not address this use case. error-stack does, or anyhow with a custom error type that holds the exit code. Either way, all you need are the exit codes. |
See benwilber/exitcode#13 (comment)
The text was updated successfully, but these errors were encountered: