From e5b105dd451ac895a2ba54df9767b23afaa24ab6 Mon Sep 17 00:00:00 2001 From: shy3130 <415333856@qq.com> Date: Fri, 14 Aug 2026 13:04:13 +0800 Subject: [PATCH] =?UTF-8?q?chore(dev):=20uv=20run=20--no-sync=20=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E4=BE=9D=E8=B5=96=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dev.sh 后端启动从 uv run 改为 uv run --no-sync, 直接用已安装的 .venv, 不再每次访问镜像源校验 lockfile。避免镜像源 403/网络抖动导致后端起不来。 dev.ps1 本就用 .venv 直起, 不受影响。 --- dev.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev.sh b/dev.sh index b8deca7..36bcc0c 100755 --- a/dev.sh +++ b/dev.sh @@ -138,7 +138,9 @@ echo ( cd "$BACKEND_DIR" - uv run uvicorn app.main:app --reload --host 0.0.0.0 --port "$BACKEND_PORT" 2>&1 \ + # --no-sync: 跳过依赖解析, 直接用已安装的 .venv 环境。 + # 避免 uv 每次启动都访问镜像源校验 lockfile (镜像源 403/网络抖动会导致后端起不来)。 + uv run --no-sync uvicorn app.main:app --reload --host 0.0.0.0 --port "$BACKEND_PORT" 2>&1 \ | prefix_awk "$(printf "${BLUE}[backend ]${NC} ")" ) & PIDS+=("$!")