1f5daebeed
拆分 nexus_publish_port/set_install_complete/sync_env_prod_to_volume 的 local 声明, 避免 env_file="$root/..." 在 root 赋值前展开导致 unbound variable。
651 B
651 B
2026-06-06 — nx update root: unbound variable 修复
摘要
修复 deploy/nexus-1panel.sh 在 set -u 下 sync_env_prod_to_volume 等函数因同行 local 引用 $root 导致升级中断。
动机
生产 sudo nx update 在写入 1panel-hosts.json 后报错:line 286: root: unbound variable,后续镜像构建/健康检查未执行。
涉及文件
deploy/nexus-1panel.sh—nexus_publish_port、set_install_complete、sync_env_prod_to_volume拆分local声明
迁移 / 重启
- 无;拉代码后重新
nx update即可
验证
bash -n deploy/nexus-1panel.sh
sudo nx update