fix: XCOpenCodeWeb 启动时传入端口参数 --port 3002
This commit is contained in:
@@ -41,6 +41,10 @@ class XCOpenCodeWebService {
|
||||
return path.join(basePath, 'services', 'xcopencodeweb', exeName);
|
||||
}
|
||||
|
||||
private getExeArgs(): string[] {
|
||||
return ['--port', this.port.toString()];
|
||||
}
|
||||
|
||||
private async checkHealth(): Promise<boolean> {
|
||||
try {
|
||||
const controller = new AbortController();
|
||||
@@ -79,9 +83,10 @@ class XCOpenCodeWebService {
|
||||
|
||||
try {
|
||||
const exePath = this.getExePath();
|
||||
log.info(`[XCOpenCodeWebService] Starting from: ${exePath}`);
|
||||
const exeArgs = this.getExeArgs();
|
||||
log.info(`[XCOpenCodeWebService] Starting from: ${exePath} with args: ${exeArgs.join(' ')}`);
|
||||
|
||||
this.process = spawn(exePath, [], {
|
||||
this.process = spawn(exePath, exeArgs, {
|
||||
stdio: 'pipe',
|
||||
shell: true,
|
||||
detached: false,
|
||||
|
||||
Reference in New Issue
Block a user