From 268f4466ea2ecb6e99963da59149343d8cc96c4f Mon Sep 17 00:00:00 2001 From: engigu Date: Fri, 13 Feb 2026 18:42:54 +0800 Subject: [PATCH] fix: first run init --- docker/docker-entrypoint.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index fc075a1..a5b5b4d 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -19,15 +19,12 @@ mkdir -p \ # ============================ # Mise 环境初始化 # ============================ -if [ ! -d "$MISE_DIR" ] || [ -z "$(ls -A "$MISE_DIR")" ]; then - echo "[entrypoint][Mise] Initializing mise environment from base..." - mkdir -p "$MISE_DIR" - # 使用 rsync 同步,更好地处理 Mac 挂载目录的大小写冲突,并跳过已存在文件 - rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true - echo "[entrypoint][Mise] Mise environment initialized" -else - echo "[entrypoint][Mise] Mise environment exists at $MISE_DIR" -fi +# 始终尝试同步基础环境(以补充用户挂载卷中可能缺失的文件,如 config.toml) +echo "[entrypoint][Mise] Syncing mise environment from base..." +mkdir -p "$MISE_DIR" +# 使用 rsync 同步: -a 归档模式, --ignore-existing 不覆盖已存在文件 +rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true +echo "[entrypoint][Mise] Mise environment synced" # ============================ # 环境变量注入