Skip to content

Commit 5059e5c

Browse files
committed
Do not raise an error if os.environ does not contain PATH
1 parent 7e3bed6 commit 5059e5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ def _find_include_dir(self, dirname, include):
243243

244244

245245
def _cmd_exists(cmd):
246+
if "PATH" not in os.environ:
247+
return
246248
return any(
247249
os.access(os.path.join(path, cmd), os.X_OK)
248250
for path in os.environ["PATH"].split(os.pathsep)

0 commit comments

Comments
 (0)