fix: first run init
This commit is contained in:
@@ -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"
|
||||
|
||||
# ============================
|
||||
# 环境变量注入
|
||||
|
||||
Reference in New Issue
Block a user