Skip to content

Commit ad90a6b

Browse files
committed
Refactor Codex process spawning to improve cross-platform compatibility
1 parent 3a072f2 commit ad90a6b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/CodexJsonRpcConnection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export interface CodexConnection {
1313
}
1414

1515
export function startCodexConnection(codexPath: string, logPath?: string): CodexConnection {
16-
const codex: ChildProcessWithoutNullStreams = spawn(`"${codexPath}" app-server`, {
17-
shell: process.platform === 'win32'
18-
});
16+
const codex: ChildProcessWithoutNullStreams = process.platform === 'win32'
17+
? spawn(`"${codexPath}" app-server`, { shell: true })
18+
: spawn(codexPath, ['app-server']);
1919

2020
if (logPath) {
2121
attachLogs(codex, logPath);

0 commit comments

Comments
 (0)