fix: fix hot-api for not build in bun app.mjs
This commit is contained in:
@@ -4,10 +4,10 @@ import { spawnSync } from 'node:child_process';
|
||||
const command = new Command('server')
|
||||
.description('启动服务')
|
||||
.option('-d, --daemon', '是否以守护进程方式运行')
|
||||
.option('-n, --name <name>', '服务名称')
|
||||
.option('-n, --name <name>', '服务名称', 'assistant-server')
|
||||
.option('-p, --port <port>', '服务端口')
|
||||
.option('-s, --start', '是否启动服务')
|
||||
.option('-i, --home', '是否以home方式运行')
|
||||
.option('-e, --interpreter <interpreter>', '指定使用的解释器', 'bun')
|
||||
.action((options) => {
|
||||
const { port } = options;
|
||||
const [_interpreter, execPath] = process.argv;
|
||||
@@ -24,8 +24,8 @@ const command = new Command('server')
|
||||
if (port) {
|
||||
shellCommands.push(`-p ${port}`);
|
||||
}
|
||||
if (options.home) {
|
||||
shellCommands.push('--home');
|
||||
if (options.interpreter) {
|
||||
shellCommands.push(`-e ${options.interpreter}`);
|
||||
}
|
||||
const basename = _interpreter.split('/').pop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user