summaryrefslogtreecommitdiffstats
path: root/Modules/getpath.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-03-06 19:49:27 (GMT)
committerGitHub <noreply@github.com>2022-03-06 19:49:27 (GMT)
commit55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7 (patch)
tree7c868345a5c96462e5eed9919927ec91e7fc29c4 /Modules/getpath.py
parent7f07b5ee9c2d17f837c44440bf066c73f92dac14 (diff)
downloadcpython-55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7.zip
cpython-55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7.tar.gz
cpython-55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7.tar.bz2
bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699)
Diffstat (limited to 'Modules/getpath.py')
-rw-r--r--Modules/getpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/getpath.py b/Modules/getpath.py
index f84e6e8..3a13bfd 100644
--- a/Modules/getpath.py
+++ b/Modules/getpath.py
@@ -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.