Skip to content

Commit

Permalink
Do not raise an error if os.environ does not contain PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 9, 2023
1 parent 7e3bed6 commit 02b976b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def _find_include_dir(self, dirname, include):


def _cmd_exists(cmd):
if not "PATH" in os.environ:
return
return any(
os.access(os.path.join(path, cmd), os.X_OK)
for path in os.environ["PATH"].split(os.pathsep)
Expand Down

0 comments on commit 02b976b

Please sign in to comment.