-
-
Notifications
You must be signed in to change notification settings - Fork 38
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 status incorrect when output reporting error #180
Comments
The |
I'm having a hard time understanding what you mean, so I'll explain what I think is the issue in more detail. In my opinion the issue here is that when a non-recoverable error is encountered, the command exits without completing the task it was supposed to, but exits with a zero status code, which means everything went well. This is a problem because a CLI user (or pipeline, or script) then assumes that the command worked and produced the expected results, while this is not the case and further operations down the line will fail because of this. IMO it's important to report that the command did not produce the expected result by exiting with a non-zero status code, which can be handled by the user (e.g. by checking As a more concrete example, in the original issue the command to create a wallet was the one failing with an error, which means the intended result of the command (creating a wallet) had not been achieved, which is why I think the exit status should have been non-zero. With a zero exit code, the user (or script) continues with the following commands (e.g. trying to generate an address) but they will fail because the wallet is not there. |
The This happens when The main.rs returns an error code if the error is raised. If there is an error report with a successful exit status, it means the system swallows an error somewhere, because |
You're right, the exit code was being masked by the fact that some |
@nicbus Thanks for your confirm. If this issue still happens please kindly reopen this issue, we can dig into this more and make it better. |
Originally posted by @nicbus in #173 (comment)
The text was updated successfully, but these errors were encountered: