Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit e11805a

Browse files
nataliejamesonfacebook-github-bot
authored andcommitted
Try to use c:\Python2.7\python.exe before defaulting to python.exe on path
Summary: Attempt to use python2 binary directly before falling back to 'python.exe' on the path Fixes 2011 Reviewed By: styurin fbshipit-source-id: 244e66f023
1 parent ce7d139 commit e11805a

File tree

1 file changed

+8
-1
lines changed
  • tools/release/platforms/chocolatey

1 file changed

+8
-1
lines changed
+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
@echo off
22
REM Invoke buck.pex in the same directory as this script with python
3-
python %~dp0\buck.pex %*
3+
REM We try to find a python2 installation first because python3 can
4+
REM install itself as 'python.exe' on the path, and we don't want that
5+
REM just yet
6+
if exist "C:\Python27\python.exe" (
7+
C:\Python27\python.exe %~dp0\buck.pex %*
8+
) else (
9+
python %~dp0\buck.pex %*
10+
)

0 commit comments

Comments
 (0)