Skip to content

文档中 hapi runner start --foreground 选项未实现 #566

@xiaoxuan010

Description

@xiaoxuan010

What version of HAPI is running?

hapi version: 0.17.2

What platform is your computer?

Windows 11 24H2

What issue are you seeing?

docs/guide/installation.md 中,多处文档示例使用 hapi runner start --foreground(如 pm2、nohup、launchd、systemd 场景),但实际 CLI 源码 cli/src/commands/runner.ts 并未解析或实现该参数。实际运行 hapi runner start --foreground 时,runner 依然以 detached(后台)方式运行,--foreground 被忽略,导致行为与文档描述不符,易导致误用。

What steps can reproduce the bug?

  1. 按文档执行命令:hapi runner start --foreground
  2. runner 实际依然以后台 detached 方式启动
  3. 查看对应 CLI 源码 cli/src/commands/runner.ts,未有 foreground 参数相关逻辑

What is the expected behavior?

  • CLI 层支持 --foreground,可以不以 detached 方式启动并让进程保持前台运行,方便 systemd/supervisor/容器等进程管理工具集成
  • 文档同步修正,移除/更正该参数用法,避免引起误导

Additional information

相关参考:

该问题会影响进程托管、自动重启、可观测性等生产级部署场景。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions