Skip to content

Commit f31faf6

Browse files
authored
pyenv-win compatibility - another approach (AUTOMATIC1111#16287)
1 parent 14c6d6c commit f31faf6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

webui.bat

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ if exist webui.settings.bat (
44
call webui.settings.bat
55
)
66

7-
if not defined PYTHON (set PYTHON=python)
7+
if not defined PYTHON (
8+
for /f "delims=" %%A in ('where python ^| findstr /n . ^| findstr ^^1:') do (
9+
if /i "%%~xA" == ".exe" (
10+
set PYTHON=python
11+
) else (
12+
set PYTHON=call python
13+
)
14+
)
15+
)
16+
817
if defined GIT (set "GIT_PYTHON_GIT_EXECUTABLE=%GIT%")
918
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")
1019

0 commit comments

Comments
 (0)