Skip to content

Commit

Permalink
fix build_llvm.py not to regard a dir as an executable file in which() (
Browse files Browse the repository at this point in the history
#21)

Summary:
In my environment, there's `cmake` directory in the PATH and `which()` found it as an executable file and the build script fails.
Pull Request resolved: #21

Reviewed By: dulinriley

Differential Revision: D16220838

Pulled By: tmikov

fbshipit-source-id: 977cb9eeb4949832ab61e6e097870c25564ecf39
  • Loading branch information
gfx authored and facebook-github-bot committed Jul 12, 2019
1 parent 3d8b3c6 commit deaf761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/build_llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def which(cmd):
):
return os.path.realpath(p_and_extension)
else:
if os.path.exists(p) and os.access(p, os.X_OK):
if os.path.isfile(p) and os.access(p, os.X_OK):
return os.path.realpath(p)
raise Exception("{} not found on PATH".format(cmd))

Expand Down

0 comments on commit deaf761

Please sign in to comment.