mirror of https://github.com/python/cpython
gh-91256: Ensure help text has the program name even before getpath is called (GH-94929)
This commit is contained in:
parent
ea11c17742
commit
49aeff49d7
|
@ -0,0 +1 @@
|
|||
Ensures the program name is known for help text during interpreter startup.
|
|
@ -2310,6 +2310,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…
Reference in New Issue