Add missing atomHome references

to make sure Linux execution is correctly getting the right home in all windows
This commit is contained in:
Dave Rael
2015-11-02 05:48:27 -08:00
committed by Kevin Sawicki
parent f92188fc27
commit 3009d3e7d5
2 changed files with 3 additions and 4 deletions

View File

@@ -251,7 +251,7 @@ class AtomApplication
@applicationMenu.update(win, template, keystrokesByCommand)
ipc.on 'run-package-specs', (event, packageSpecPath) =>
@runTests({resourcePath: @devResourcePath, pathsToOpen: [packageSpecPath], headless: false})
@runTests({resourcePath: @devResourcePath, @atomHome, pathsToOpen: [packageSpecPath], headless: false})
ipc.on 'command', (event, command) =>
@emit(command)
@@ -467,7 +467,7 @@ class AtomApplication
# :urlToOpen - The atom:// url to open.
# :devMode - Boolean to control the opened window's dev mode.
# :safeMode - Boolean to control the opened window's safe mode.
openUrl: ({urlToOpen, devMode, safeMode}) ->
openUrl: ({urlToOpen, devMode, safeMode, atomHome}) ->
unless @packages?
PackageManager = require '../package-manager'
@packages = new PackageManager

View File

@@ -57,14 +57,13 @@ setupCrashReporter = ->
crashReporter.start(productName: 'Atom', companyName: 'GitHub')
setupAtomHome = ->
return process.env.ATOM_HOME if process.env.ATOM_HOME
return if process.env.ATOM_HOME
atomHome = path.join(app.getHomeDir(), '.atom')
AtomPortable = require './atom-portable'
atomHome = AtomPortable.getPortableAtomHomePath() if AtomPortable.isPortableInstall(process.platform, process.env.ATOM_HOME, atomHome)
try
atomHome = fs.realpathSync(atomHome)
process.env.ATOM_HOME = atomHome
return atomHome
setupCompileCache = ->
compileCache = require('../compile-cache')