Set config schema entirely in the snapshot

This commit is contained in:
Antonio Scandurra
2017-03-08 15:28:19 +01:00
parent f5a19a6904
commit 05eb737a94
3 changed files with 16 additions and 15 deletions

View File

@@ -401,11 +401,13 @@ class Config
constructor: ({@notificationManager, @enablePersistence}={}) ->
@clear()
initialize: ({@configDirPath, @resourcePath}) ->
initialize: ({@configDirPath, @resourcePath, projectHomeSchema}) ->
if @enablePersistence?
@configFilePath = fs.resolve(@configDirPath, 'config', ['json', 'cson'])
@configFilePath ?= path.join(@configDirPath, 'config.cson')
@schema.properties.core.properties.projectHome = projectHomeSchema
clear: ->
@emitter = new Emitter
@schema =