mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-91256: Ensure help text has the program name even before getpath is called (GH-94929)
(cherry picked from commit 49aeff49d7
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
9487e8d250
commit
bb8e20a329
2 changed files with 4 additions and 0 deletions
|
@ -2295,6 +2295,9 @@ config_parse_cmdline(PyConfig *config, PyWideStringList *warnoptions,
|
|||
const PyWideStringList *argv = &config->argv;
|
||||
int print_version = 0;
|
||||
const wchar_t* program = config->program_name;
|
||||
if (!program && argv->length >= 1) {
|
||||
program = argv->items[0];
|
||||
}
|
||||
|
||||
_PyOS_ResetGetOpt();
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue