feat(device): shell 支持配置绝对路径与 busybox,默认仍为 sh/cmd
不做自动探测(各系统 shell 变体太多,交给配置);配了路径就按 POSIX 语义 -c 执行, busybox 走 sh -c;上报给 core 的 shell 归成短标签(bash/busybox/sh/cmd/powershell)。
This commit is contained in:
@@ -63,6 +63,20 @@ sh scripts/build.sh all
|
||||
|
||||
优先级:**命令行显式参数 > 环境变量 `NODE_TOKEN`(仅 token)> 配置文件 > 默认值**。
|
||||
|
||||
### shell 用哪个
|
||||
|
||||
默认:macOS / Linux 用 `/bin/sh`(固定,不读 `$SHELL`——用户把默认 shell 设成 fish 时,
|
||||
模型写的 POSIX 语法会全废);Windows 用 `cmd`。
|
||||
|
||||
想换就在 `config.json` 里写 `shell`,**不做自动探测**:装了 Git Bash / busybox 就写路径,
|
||||
没装就保持默认。
|
||||
|
||||
```json
|
||||
{ "shell": "C:\\Program Files\\Git\\bin\\bash.exe" }
|
||||
```
|
||||
|
||||
报给 core 的是短标签(`sh` / `bash` / `busybox` / `cmd` / `powershell`),同时带上解释器路径与版本。
|
||||
|
||||
| 参数 | 说明 |
|
||||
|---|---|
|
||||
| `-server` | core 的接入地址,`wss://…/dev/ws` |
|
||||
|
||||
Reference in New Issue
Block a user