From aca639cccfe80e69c016d0711cf705c60b81c6d2 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Fri, 4 Oct 2024 15:10:53 -0400 Subject: [PATCH] Added `--headless` flag #8 --- electron/src/main/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electron/src/main/index.ts b/electron/src/main/index.ts index d004082..2943902 100644 --- a/electron/src/main/index.ts +++ b/electron/src/main/index.ts @@ -72,7 +72,10 @@ app.whenReady().then(async () => { } } - apiProcess.stdout?.on('data', createWindowOnServerListening) + console.log('[electron] Arguments', process.argv) + if (!process.argv.includes('--headless')) { + apiProcess.stdout?.on('data', createWindowOnServerListening) + } apiProcess.postMessage({ event: 'version', body: app.getVersion() }) // apiProcess.postMessage({ event: 'updateChannel', body: autoUpdater.channel })