Use a temporary storage directory when running specs

This commit is contained in:
Max Brunsfeld
2016-02-18 15:10:43 -08:00
parent 8a24364e80
commit aabaf1c2ba

View File

@@ -7,6 +7,7 @@ process.on 'uncaughtException', (error={}) ->
{crashReporter, app} = require 'electron'
fs = require 'fs-plus'
path = require 'path'
temp = require 'temp'
yargs = require 'yargs'
console.log = require 'nslog'
@@ -33,6 +34,8 @@ start = ->
if args.userDataDir?
app.setPath('userData', args.userDataDir)
else if args.test
app.setPath('userData', temp.mkdirSync('atom-test-data'))
app.on 'ready', ->
app.removeListener 'open-file', addPathToOpen