mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user