Skip to content

Commit

Permalink
tools,win: fix find_python error
Browse files Browse the repository at this point in the history
On a machine without `python.exe` in the PATH the script was failing
with:

```console
> .\vcbuild.bat
Looking for Python 2.x
2> was unexpected at this time.
```

Escaping the `>` seems to resolve it.

PR-URL: #22797
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
kfarnung authored and targos committed Sep 20, 2018
1 parent 6e9f1d6 commit 0fc79d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/msvs/find_python.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXIT /B

:: Query registry sub-tree for InstallPath
:find-key
FOR /F "delims=" %%a IN ('REG QUERY %1 /s 2> NUL ^| findstr "2." ^| findstr InstallPath') DO IF NOT ERRORLEVEL 1 CALL :find-path %%a
FOR /F "delims=" %%a IN ('REG QUERY %1 /s 2^> NUL ^| findstr "2." ^| findstr InstallPath') DO IF NOT ERRORLEVEL 1 CALL :find-path %%a
EXIT /B

:: Parse the value of %1 as the path for python.exe
Expand Down

0 comments on commit 0fc79d4

Please sign in to comment.