fix: start.bat pip安装抑制警告避免误判失败,报错信息区分venv/no-venv

This commit is contained in:
qinglong
2026-06-14 19:23:50 +08:00
parent d626a0631a
commit cd45372141
+5 -1
View File
@@ -71,9 +71,13 @@ if exist "config\framework\base_config.yaml" (
echo. echo.
if %FAIL% gtr 0 ( if %FAIL% gtr 0 (
echo [WARN] %FAIL% 项缺失,自动安装... echo [WARN] %FAIL% 项缺失,自动安装...
"%PYTHON%" -m pip install -r requirements.txt "%PYTHON%" -m pip install -r requirements.txt --no-warn-script-location --root-user-action=ignore 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
if %NO_VENV% equ 1 (
echo [FAIL] 安装失败,请手动执行: pip install -r requirements.txt
) else (
echo [FAIL] 安装失败,请手动执行: .venv\Scripts\pip install -r requirements.txt echo [FAIL] 安装失败,请手动执行: .venv\Scripts\pip install -r requirements.txt
)
pause pause
exit /b 1 exit /b 1
) )