Skip to content

Commit

Permalink
Move and reword comment for brevity and clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 20, 2024
1 parent 7deebe6 commit 8aef5b8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions distutils/spawn.py
Expand Up @@ -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:
Expand Down

0 comments on commit 8aef5b8

Please sign in to comment.