fix(deploy): .env 中带空格的值未加引号导致 install.sh 以 127 失败

现象:
  ./deploy/.env: line 53: Miku.pmx: command not found
  [install] 第 53 行执行失败(退出码 127)

根因:deploy/.env.example 的 MODEL_CONVERT_PMX=Hatsune Miku.pmx 值含空格
却没加引号,install.sh 用 `set -a; . deploy/.env` 载入时被切成
「赋值 + 命令」,Miku.pmx 被当成命令执行。

修复:
1. 模板改为 MODEL_CONVERT_PMX="Hatsune Miku.pmx"(占位符值同样加引号);
2. 新增 deploy/env-lib.sh:.env 语法预检,install.sh / ctl.sh 在 source
   之前检查,报错给出「哪一行 / 原文 / 改法」, 与反引号建议单引号;
3. install.sh 的 ERR trap 补上出错文件名(lineno 属于被 source 的 .env,
   只报行号无法定位);
4. 新增 test/env-file.spec.ts 12 项回归测试,锁住「模板可被 shell 原样载入」;
5. 版本升到 0.2.1,README(.md/.txt)/DSH.md 补 .env 写法约定、FAQ 与测试数量。
This commit is contained in:
opendance
2026-09-15 22:26:58 +08:00
parent d6376ec5a5
commit ea58520fc2
14 changed files with 412 additions and 33 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
project: opendance-web-server
version: 0.2.0
version: 0.2.1
repository: opendance-web
default_branch: main
contracts_version: 0.4.0
@@ -60,7 +60,7 @@ tasks:
status: done
deliverable:
artifact: opendance-web-v0.2.0.tar.gz
artifact: opendance-web-v0.2.1.tar.gz
packaging: Linux 业务服务(系统服务托管,双端口:软件 API + 管理端,不含 MySQL、不含反向代理、不使用 Docker)
includes:
- web-server/ # NestJS 源码 + 构建产物(含 BVH / VMD 内置解析、ZIP 读取与模型压缩包转换)