Call @config.load() in AtomApplication constructor

This is needed in order to test configuration settings like
`restorePreviousWindowsOnStart`. Even if this call has side effects, its
scope is pretty constrained because it affects only the temporary
directory we create before each atom-application test.
This commit is contained in:
Antonio Scandurra
2016-08-12 11:20:26 +02:00
parent 02bc4282d0
commit c422699c80

View File

@@ -69,6 +69,7 @@ class AtomApplication
@config = new Config({configDirPath: process.env.ATOM_HOME, @resourcePath, enablePersistence: true})
@config.setSchema null, {type: 'object', properties: _.clone(require('../config-schema'))}
@config.load()
@fileRecoveryService = new FileRecoveryService(path.join(process.env.ATOM_HOME, "recovery"))
@storageFolder = new StorageFolder(process.env.ATOM_HOME)
@@ -82,7 +83,6 @@ class AtomApplication
initialize: (options) ->
global.atomApplication = this
@config.load()
@config.onDidChange 'core.useCustomTitleBar', @promptForRelaunch
@autoUpdateManager = new AutoUpdateManager(@version, options.test, @resourcePath, @config)