From 0997d2161ac126310072e0a3b4410c19da704083 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 22 Feb 2018 13:48:06 +0100 Subject: [PATCH] HIDE_DEV_WINDOW env var to prevent opening of dev window --- src/main/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/app.js b/src/main/app.js index 10807e50..99d35cc3 100644 --- a/src/main/app.js +++ b/src/main/app.js @@ -11,7 +11,13 @@ let mainWindow = null let forceClose = false -const { UPGRADE_EXTENSIONS, ELECTRON_WEBPACK_WDS_PORT, DEV_TOOLS, DEV_TOOLS_MODE } = process.env +const { + UPGRADE_EXTENSIONS, + ELECTRON_WEBPACK_WDS_PORT, + DEV_TOOLS, + DEV_TOOLS_MODE, + HIDE_DEV_WINDOW, +} = process.env const devTools = __DEV__ || DEV_TOOLS @@ -211,7 +217,7 @@ app.on('ready', async () => { await installExtensions() } - if (devTools) { + if (devTools && !HIDE_DEV_WINDOW) { createDevWindow() }