electron-113: refactored the code as per PR comments

This commit is contained in:
Vishwas Shashidhar
2017-08-23 14:32:58 +05:30
parent 8aa5f50459
commit f2909cdebd
2 changed files with 13 additions and 32 deletions

View File

@@ -120,8 +120,11 @@ function setupThenOpenMainWindow() {
// as the app is launched as a root user we don't get
// access to the config file
let launchOnStartup = process.argv[3];
// We wire this in via the post install script
// to get the config file path where the app is installed
let appGlobalConfigPath = process.argv[2];
setStartup(launchOnStartup)
.then(() => updateUserConfigMac(process.argv[2]))
.then(() => updateUserConfigMac(appGlobalConfigPath))
.then(app.quit)
.catch(app.quit);
return;