mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-22 00:13:09 +08:00
fix(ProcessTransport): replace spawn with fork for Node.js process handling
This commit is contained in:
parent
65ac3181a8
commit
02cf012671
@ -19,7 +19,7 @@ index 461e9a2ba246778261108a682762ffcf26f7224e..44bd667d9f591969d36a105ba5eb8b47
|
|||||||
- const spawnCommand = isNative ? pathToClaudeCodeExecutable : executable;
|
- const spawnCommand = isNative ? pathToClaudeCodeExecutable : executable;
|
||||||
- const spawnArgs = isNative ? args : [...executableArgs, pathToClaudeCodeExecutable, ...args];
|
- const spawnArgs = isNative ? args : [...executableArgs, pathToClaudeCodeExecutable, ...args];
|
||||||
- this.logForDebugging(isNative ? `Spawning Claude Code native binary: ${pathToClaudeCodeExecutable} ${args.join(" ")}` : `Spawning Claude Code process: ${executable} ${[...executableArgs, pathToClaudeCodeExecutable, ...args].join(" ")}`);
|
- this.logForDebugging(isNative ? `Spawning Claude Code native binary: ${pathToClaudeCodeExecutable} ${args.join(" ")}` : `Spawning Claude Code process: ${executable} ${[...executableArgs, pathToClaudeCodeExecutable, ...args].join(" ")}`);
|
||||||
+ this.logDebug(`Forking Claude Code Node.js process: ${pathToClaudeCodeExecutable} ${args.join(" ")}`);
|
+ this.logForDebugging(`Forking Claude Code Node.js process: ${pathToClaudeCodeExecutable} ${args.join(" ")}`);
|
||||||
const stderrMode = env.DEBUG || stderr ? "pipe" : "ignore";
|
const stderrMode = env.DEBUG || stderr ? "pipe" : "ignore";
|
||||||
- this.child = spawn(spawnCommand, spawnArgs, {
|
- this.child = spawn(spawnCommand, spawnArgs, {
|
||||||
+ this.child = fork(pathToClaudeCodeExecutable, args, {
|
+ this.child = fork(pathToClaudeCodeExecutable, args, {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user