Repository navigation
install 幂等化:已配置直接加载,小白可整段重复粘贴 - #2
Conversation
- 检测到已有配置时显示现有域名/UUID/协议,服务未运行自动拉起,直接输出连接命令 - 仅残缺配置(缺 systemd 单元或元数据)才提示 uninstall 后重装 - README/docs 换成可整段重复粘贴的命令:clone 失败不中断 + git pull 更新 - FAQ 新增"重复执行 install 会怎样";测试 68 -> 69 项
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f84eec0d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ```bash | ||
| git clone https://github.com/buyi06/cf-ssh-tunnel-kit.git | ||
| git clone https://github.com/buyi06/cf-ssh-tunnel-kit.git 2>/dev/null || true |
There was a problem hiding this comment.
Stop masking failed clones in the paste block
When git clone fails for any reason other than the directory already existing, such as a transient network error or missing git, this || true suppresses the real failure and the pasted block continues; if cd cf-ssh-tunnel-kit then fails, the following git pull/sudo bash scripts/... run from the caller's current directory. For the advertised repeat-paste install flow, guard only the already-cloned case and stop on clone/cd failures, e.g. test for the directory before cloning and use cd cf-ssh-tunnel-kit || exit.
Useful? React with 👍 / 👎.
真实用户反馈:已装过再次执行 install 直接报错退出,对小白不友好。
改动
install检测到已有配置(单元文件/元数据/配置目录任一)→ 直接加载:显示现有域名、UUID、协议;服务未运行自动enable --now拉起;输出客户端配置与连接命令git clone ... 2>/dev/null || true+cd+git pull --ff-only+install,目录已存在/已装过都不再报错卡人验证
本地 69/69 测试通过(新增幂等加载断言),bash -n 通过。