-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-34532: Fixed exit code for py.exe list versions arg #9039
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
Conversation
Previously, any of the list version args would cause the launcher to exit with the `RC_NO_PYTHON` error code. This change causes the list version args to exit successfully.
PC/launcher.c
Outdated
valid = show_python_list(argv); /* Check for -0 or --list FIRST */ | ||
show_python_list(argv); | ||
version_call = TRUE; | ||
executable = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just return immediately from here? There doesn't seem to be any cleanup that has to happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote it to imitate the behavior of -h where it'll search for any Python version and return RC_NO_PYTHON
if nothing is found. If that's not desirable, could just bump the check up a level.
1fccd57
to
10e01f0
Compare
Moved return up as advised |
(cherry picked from commit c8fe9cc) Co-authored-by: Brendan Gerrity <[email protected]>
GH-10622 is a backport of this pull request to the 3.7 branch. |
Sorry, @bgerrity and @zooba, I could not cleanly backport this to |
Doesn't need to go to 3.6 |
(cherry picked from commit c8fe9cc) Co-authored-by: Brendan Gerrity <[email protected]>
Previously, any of the list version args would cause the launcher to exit with the
RC_NO_PYTHON
error code. This change causes the list version args to exit successfully.https://bugs.python.org/issue34532