Skip to content

objectui serve 无条件开浏览器且没有 --no-open,无头环境下打印一条裸 spawn 错误 #4924

Description

@yinlianghui

越界发现,记录于 #3890 / PR #4922 的实测期间。观察类:今天不影响任何渲染结果,服务照常起,只是在无头环境里多一条看起来像崩溃的输出。

事实(实测于 origin/main = 5ffcc1432)

commands/serve.ts 的 vite 配置把 open 写死为 true,而 serve 的 commander 选项只有 --port / --host,没有 dev 那样的 --no-open。无头容器里实测:

✓ Server started successfully!

  Local:   http://localhost:5896

  Press Ctrl+C to stop the server

Error: spawn xdg-open ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)

服务本身没有受影响(同一次运行里走了 400 个模块,全部 200),但这条输出出现在成功横幅之后、没有任何上下文,读起来像启动失败。

为什么记成观察类

已搜重

本仓开放 issue 搜过 objectui serve opens a browser automatically no-open flag headless xdg-open:零命中。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions