mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
fix(daemon): use bin/chatlab.mjs as launchd/systemd entry point
dist/cli.mjs 只导出 run() 而不调用它,直接运行会立即静默退出(exit 0)。 bin/chatlab.mjs 才是真正调用 run() 的可执行入口,与 npm bin 字段一致。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c98daa654
commit
b01c6c7e7a
1 file changed
+2
-2
@@ -70,7 +70,7 @@ export interface ServiceStatus {
|
||||
function buildPlist(options: ServiceInstallOptions): string {
|
||||
const port = options.port ?? 3110
|
||||
const host = options.host ?? '127.0.0.1'
|
||||
const cliEntry = resolveCliPath('dist/cli.mjs')
|
||||
const cliEntry = resolveCliPath('bin/chatlab.mjs')
|
||||
const args = ['start', '--no-open', '--port', String(port), '--host', host]
|
||||
if (options.token) args.push('--token', options.token)
|
||||
if (options.headless) args.push('--headless')
|
||||
@@ -191,7 +191,7 @@ function escapeSystemdArg(arg: string): string {
|
||||
function buildUnit(options: ServiceInstallOptions): string {
|
||||
const port = options.port ?? 3110
|
||||
const host = options.host ?? '127.0.0.1'
|
||||
const cliEntry = resolveCliPath('dist/cli.mjs')
|
||||
const cliEntry = resolveCliPath('bin/chatlab.mjs')
|
||||
const args = ['start', '--no-open', '--port', String(port), '--host', host]
|
||||
if (options.token) args.push('--token', options.token)
|
||||
if (options.headless) args.push('--headless')
|
||||
|
||||
Reference in new issue
Block a user