fix: first run init

This commit is contained in:
engigu
2026-02-13 18:42:54 +08:00
parent b532c8edcc
commit 268f4466ea
+6 -9
View File
@@ -19,15 +19,12 @@ mkdir -p \
# ============================ # ============================
# Mise 环境初始化 # Mise 环境初始化
# ============================ # ============================
if [ ! -d "$MISE_DIR" ] || [ -z "$(ls -A "$MISE_DIR")" ]; then # 始终尝试同步基础环境(以补充用户挂载卷中可能缺失的文件,如 config.toml
echo "[entrypoint][Mise] Initializing mise environment from base..." echo "[entrypoint][Mise] Syncing mise environment from base..."
mkdir -p "$MISE_DIR" mkdir -p "$MISE_DIR"
# 使用 rsync 同步,更好地处理 Mac 挂载目录的大小写冲突,并跳过已存在文件 # 使用 rsync 同步: -a 归档模式, --ignore-existing 不覆盖已存在文件
rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true
echo "[entrypoint][Mise] Mise environment initialized" echo "[entrypoint][Mise] Mise environment synced"
else
echo "[entrypoint][Mise] Mise environment exists at $MISE_DIR"
fi
# ============================ # ============================
# 环境变量注入 # 环境变量注入