git-llvm script should add .exe on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303708 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner 2017-05-24 00:28:46 +00:00
parent d448c732cb
commit 69916e12b3

View File

@ -134,6 +134,8 @@ def svn(cwd, *cmd, **kwargs):
ignore_errors=kwargs.get('ignore_errors', None))
def program_exists(cmd):
if sys.platform == 'win32' and not cmd.endswith('.exe'):
cmd += '.exe'
for path in os.environ["PATH"].split(os.pathsep):
if os.access(os.path.join(path, cmd), os.X_OK):
return True