summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-20 13:48:34 -0800
committerGitHub <noreply@github.com>2018-11-20 13:48:34 -0800
commit129642a1ff6a2f55933186b2303c307d58b710eb (patch)
treebed16206019beec13b810140794baed3a83601c5 /PC
parent6eff6b8eecd7a8eccad16419269fa18ec820922e (diff)
downloadcpython-git-129642a1ff6a2f55933186b2303c307d58b710eb.tar.gz
bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)
(cherry picked from commit c8fe9ccf7bfbcf9a2cb48e3b6abacf6ec0e5e58d) Co-authored-by: Brendan Gerrity <brerrity@gmail.com>
Diffstat (limited to 'PC')
-rw-r--r--PC/launcher.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/PC/launcher.c b/PC/launcher.c
index eb3433ab53..7d666aae4a 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -1453,7 +1453,7 @@ show_python_list(wchar_t ** argv)
fwprintf(stderr, L"\n\nCan't find a Default Python.\n\n");
else
fwprintf(stderr, L"\n\n"); /* End with a blank line */
- return(FALSE); /* If this has been called we cannot continue */
+ return FALSE; /* If this has been called we cannot continue */
}
static int
@@ -1600,11 +1600,12 @@ process(int argc, wchar_t ** argv)
else {
p = argv[1];
plen = wcslen(p);
- if ((argc == 2) &&
- (!wcsncmp(p, L"-0", wcslen(L"-0")) || /* Starts with -0 or --list */
+ if ((argc == 2) && // list version args
+ (!wcsncmp(p, L"-0", wcslen(L"-0")) ||
!wcsncmp(p, L"--list", wcslen(L"--list"))))
{
- valid = show_python_list(argv); /* Check for -0 or --list FIRST */
+ show_python_list(argv);
+ return rc;
}
valid = valid && (*p == L'-') && validate_version(&p[1]);
if (valid) {