pyenv-win compatibility - another approach (#16287)

This commit is contained in:
viking1304 2024-10-29 15:54:58 +01:00 committed by GitHub
parent 14c6d6cb3a
commit f31faf6f14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,16 @@ if exist webui.settings.bat (
call webui.settings.bat
)
if not defined PYTHON (set PYTHON=python)
if not defined PYTHON (
for /f "delims=" %%A in ('where python ^| findstr /n . ^| findstr ^^1:') do (
if /i "%%~xA" == ".exe" (
set PYTHON=python
) else (
set PYTHON=call python
)
)
)
if defined GIT (set "GIT_PYTHON_GIT_EXECUTABLE=%GIT%")
if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")