]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699)
authorChristian Heimes <christian@python.org>
Sun, 6 Mar 2022 19:49:27 +0000 (21:49 +0200)
committerGitHub <noreply@github.com>
Sun, 6 Mar 2022 19:49:27 +0000 (20:49 +0100)
Modules/getpath.py

index f84e6e8afaf62ced7ba2b8ee48c112d3a1a642ba..3a13bfdf491a14f75c75944b155257145fe8e957 100644 (file)
@@ -277,7 +277,7 @@ elif os_name == 'darwin':
     # executable path was provided in the config.
     real_executable = executable
 
-if not executable and program_name:
+if not executable and program_name and ENV_PATH:
     # Resolve names against PATH.
     # NOTE: The use_environment value is ignored for this lookup.
     # To properly isolate, launch Python with a full path.