Skip to content

Commit

Permalink
Update run.bat (#3783)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Beales <rich@richbeales.net>
  • Loading branch information
itsmarble and richbeales authored May 4, 2023
1 parent fad24b3 commit ad8b8cb
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions run.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
@echo off
python scripts/check_requirements.py requirements.txt
setlocal enabledelayedexpansion

:FindPythonCommand
for %%A in (python python3) do (
where /Q %%A
if !errorlevel! EQU 0 (
set "PYTHON_CMD=%%A"
goto :Found
)
)

echo Python not found. Please install Python.
pause
exit /B 1

:Found
%PYTHON_CMD% scripts/check_requirements.py requirements.txt
if errorlevel 1 (
echo Installing missing packages...
pip install -r requirements.txt
%PYTHON_CMD% -m pip install -r requirements.txt
)
python -m autogpt %*
pause
%PYTHON_CMD% -m autogpt %*
pause

0 comments on commit ad8b8cb

Please sign in to comment.