From a06a3a7203cc59208c2de0db8b5736326a6dfaaf Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Thu, 21 Mar 2024 02:07:56 +0800 Subject: [PATCH] adjust `stdio: ['inherit', 'inherit', 'inherit',...]` to `stdio: [process.stdin, process.stdout, process.stderr,...]` --- .../run-core-of-geek-auto-start-chat-with-boss/daemon-main.mjs | 2 +- .../main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts | 2 +- packages/ui/src/main/window/mainWindow.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/run-core-of-geek-auto-start-chat-with-boss/daemon-main.mjs b/packages/run-core-of-geek-auto-start-chat-with-boss/daemon-main.mjs index d2b2293..8c50203 100644 --- a/packages/run-core-of-geek-auto-start-chat-with-boss/daemon-main.mjs +++ b/packages/run-core-of-geek-auto-start-chat-with-boss/daemon-main.mjs @@ -21,7 +21,7 @@ function runWithDaemon () { 'main.mjs' )], { - stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc'], + stdio: [process.stdin, process.stdout, process.stderr, 'pipe', 'ipc'], env: { ...process.env, MAIN_BOSSGEEKGO_RERUN_INTERVAL: rerunInterval diff --git a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts index 0a015b3..537a56d 100644 --- a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts +++ b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts @@ -13,7 +13,7 @@ const rerunInterval = (() => { })() function runWithDaemon() { const subProcessOfCore = childProcess.spawn(process.argv[0], process.argv.slice(1), { - stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc'], + stdio: [process.stdin, process.stdout, process.stderr, 'pipe', 'ipc'], env: { ...process.env, MAIN_BOSSGEEKGO_UI_RUN_MODE: 'geekAutoStartWithBossMain' diff --git a/packages/ui/src/main/window/mainWindow.ts b/packages/ui/src/main/window/mainWindow.ts index 4bfc48c..a0f5ae0 100644 --- a/packages/ui/src/main/window/mainWindow.ts +++ b/packages/ui/src/main/window/mainWindow.ts @@ -128,7 +128,7 @@ export function createMainWindow(): void { } subProcessOfPuppeteer = childProcess.spawn(process.argv[0], process.argv.slice(1), { env: subProcessEnv, - stdio: [null, null, null, 'pipe', 'ipc'] + stdio: [process.stdin, process.stdout, process.stderr, 'pipe', 'ipc'] }) console.log(subProcessOfPuppeteer) return new Promise((resolve, reject) => {