Fix possible race condition caused by config dir moving after makeSingleInstance

This commit is contained in:
Ben Gotow 2017-10-20 11:06:32 -07:00
parent 2cd2d1ccfb
commit 5da7cddecf

View file

@ -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) => {