-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
raising CommandError leaves returncode as 0 #118
Comments
Came here to post this, but it looks like this has been inactive for 2 years? This is a serious bug, where scripts fail but report that they succeed. If the concern is backwards compatability, I suggest deprecating A less drastic option would be to add the ability to set the exit code in a CommandError, but have it default to 0. This is a smaller change but leaves the default as being dangerous and broken, which is definitely not ideal. |
Just to make some noise for the benefit of #124, this is a pretty serious issue still, another two years later. |
@ekimekim thanks for raising the issue and fixing it in yaargh. Would you mind if I port ekimekim#12 to Argh? P.S.: I've taken a closer look at what you did in Yaargh in terms of analysis, code and documentation. If you're interested in contributing to Argh, I'd really rather ask you to take care of integration of this behaviour into Argh as your expertise on this topic is clearly deeper than mine at this point. In general the projects seem to have diverged a bit in one particular aspect (support for help-via-annotations was improved in Yaargh but is about to be removed in Argh in favour of #107) but otherwise it would be great if we could combine our resources. |
That would be great!
To be honest I haven't really worked on this at all in a few years, but I'd love to help. I'll get started on an upstreamable version of ekimekim#12 and we'll see how it goes. |
It feels a bit weird as if you raise a CommandError then presumably the program hasn't succeeded in which case I'd expected returncode to be nonzero so that a script would know programmatically that something failed.
The text was updated successfully, but these errors were encountered: