From 5da7cddecf136860aac8e6625bfa9f0a777933d8 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 20 Oct 2017 11:06:32 -0700 Subject: [PATCH] Fix possible race condition caused by config dir moving after makeSingleInstance --- app/src/browser/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/browser/main.js b/app/src/browser/main.js index 0339bf1a4..9fa0b9a82 100644 --- a/app/src/browser/main.js +++ b/app/src/browser/main.js @@ -230,6 +230,9 @@ const start = () => { } const options = parseCommandLine(process.argv); + global.errorLogger = setupErrorLogger(options); + const configDirPath = setupConfigDir(options); + options.configDirPath = configDirPath; if (!options.devMode) { const otherInstanceRunning = app.makeSingleInstance(commandLine => { @@ -243,9 +246,6 @@ const start = () => { } } - global.errorLogger = setupErrorLogger(options); - const configDirPath = setupConfigDir(options); - options.configDirPath = configDirPath; setupCompileCache(configDirPath); const onOpenFileBeforeReady = (event, file) => {