From 8aef5b864f22b5457c51f5d41fa4729d4940734c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 20 Apr 2024 18:10:02 -0400 Subject: [PATCH] Move and reword comment for brevity and clarity. --- distutils/spawn.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/distutils/spawn.py b/distutils/spawn.py index d0c72882..e602ce6e 100644 --- a/distutils/spawn.py +++ b/distutils/spawn.py @@ -85,14 +85,13 @@ def _executable_candidates(executable: pathlib.Path): def _search_paths(path): if path is None: path = os.environ.get('PATH', None) + # bpo-35755: Don't fall through if PATH is the empty string if path is None: try: path = os.confstr("CS_PATH") except (AttributeError, ValueError): # os.confstr() or CS_PATH is not available path = os.defpath - # bpo-35755: Don't use os.defpath if the PATH environment variable is - # set to an empty string # PATH='' doesn't match, whereas PATH=':' looks in the current directory if not path: