diff --git a/bin/omarchy-cn-update b/bin/omarchy-cn-update index 3bf76838..0c5762f5 100755 --- a/bin/omarchy-cn-update +++ b/bin/omarchy-cn-update @@ -52,6 +52,14 @@ stable) ;; esac +# Never move onto a tree that predates the channel mechanism: its update +# command cannot switch back, stranding the install +if [[ ! -f $src/bin/omarchy-cn-channel ]]; then + git -C "$src" checkout -q "$old" + echo "$channel 通道的目标发布早于通道机制,已回退;请使用 nightly 或更新的发布" >&2 + exit 1 +fi + new=$(git -C "$src" rev-parse --short HEAD) echo "Channel: $channel, source: $old -> $new" diff --git a/manual/zh-cn/02-mirrors.md b/manual/zh-cn/02-mirrors.md index 397ba976..f68905a0 100644 --- a/manual/zh-cn/02-mirrors.md +++ b/manual/zh-cn/02-mirrors.md @@ -32,5 +32,6 @@ omarchycn dev-mirror doctor # 连通性检查 ``` 写入前备份到 `~/.local/state/omarchycn/backups/dev-mirror/<时间戳>/`, -恢复:`omarchycn restore list` + `omarchycn restore config <时间戳>`。 -docker 目标写 `/etc/docker/daemon.json`(需 sudo,重启 docker 生效)。 +恢复:`omarchycn restore list` + `omarchycn restore config <时间戳>`(仅用户级文件)。 +docker 目标写 `/etc/docker/daemon.json`(需 sudo,重启 docker 生效;系统文件不参与 +自动恢复,回退用 `omarchycn dev-mirror apply official --target docker`)。