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 Jun 28, 2024
1 parent bce1a22 commit 5d2a97e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions distutils/spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ def find_executable(executable, path=None):

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 5d2a97e

Please sign in to comment.