mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Use makeTreeSync
This commit is contained in:
@@ -227,7 +227,7 @@ describe "Config", ->
|
||||
|
||||
describe "when the config file does not exist", ->
|
||||
it "creates it with an empty object", ->
|
||||
fs.makeTree(config.configDirPath)
|
||||
fs.makeTreeSync(config.configDirPath)
|
||||
config.loadUserConfig()
|
||||
expect(fs.existsSync(config.configFilePath)).toBe true
|
||||
expect(CSON.readFileSync(config.configFilePath)).toEqual {}
|
||||
|
||||
@@ -58,7 +58,7 @@ class Config
|
||||
initializeConfigDirectory: (done) ->
|
||||
return if fs.existsSync(@configDirPath)
|
||||
|
||||
fs.makeTree(@configDirPath)
|
||||
fs.makeTreeSync(@configDirPath)
|
||||
|
||||
queue = async.queue ({sourcePath, destinationPath}, callback) =>
|
||||
fs.copy(sourcePath, destinationPath, callback)
|
||||
@@ -80,7 +80,7 @@ class Config
|
||||
# Private:
|
||||
loadUserConfig: ->
|
||||
unless fs.existsSync(@configFilePath)
|
||||
fs.makeTree(path.dirname(@configFilePath))
|
||||
fs.makeTreeSync(path.dirname(@configFilePath))
|
||||
CSON.writeFileSync(@configFilePath, {})
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user