-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip search should set and return a userful shell status code #22
Comments
I like the idea. One downside is that pip has to maintain a list of error Example:
+1
|
|
There's actually a list of errno symbols here: http://docs.python.org/library/errno.html Does a standard exit code system currently exist for pip? |
This is from the discussion in #pip on freenode:
|
By now we have zero (no exit status code specified at commands.search.run) for success and not found. I agree no matches should not exit 0, but I don't know what status code we should use. Let me write a small patch. |
@hugobr I thought I saw a pull request to add CommandError, etc. |
Ah ok was merged |
Sorry for taking so long to implement this and merge. It is done as follows:
There are places where exit status are hard coded and not imported from |
Currently,
pip search
exits with the status code0
under all non-error conditions (as does most of pip itself I'd guess). But this is not very useful for e.g. testing ifpip
found a result.It would be nice if
pip search
returned non-zero in case it does not find anything, so it can be used insh
scripts or lines.The text was updated successfully, but these errors were encountered: