mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli): hide windows console windows for runner/claude subprocesses (#242)
This commit is contained in:
@@ -105,5 +105,11 @@ export function spawnHappyCLI(args: string[], options: SpawnOptions = {}): Child
|
||||
}
|
||||
}
|
||||
|
||||
return spawn(spawnCommand, spawnArgs, options);
|
||||
// On Windows, detached processes allocate a new console window by default.
|
||||
// windowsHide: true suppresses this to prevent cmd windows from accumulating.
|
||||
const finalOptions: SpawnOptions = { ...options };
|
||||
if (process.platform === 'win32' && options.detached) {
|
||||
finalOptions.windowsHide = true;
|
||||
}
|
||||
return spawn(spawnCommand, spawnArgs, finalOptions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user