Replace global.homeDir with app.getHomeDir()

This commit is contained in:
probablycorey
2013-06-19 09:33:34 -07:00
parent 95f43917a4
commit d8ba422178
3 changed files with 4 additions and 5 deletions

View File

@@ -102,7 +102,7 @@ class AtomApplication
label: 'Run Specs'
accelerator: 'Command+MacCtrl+Alt+S'
click: =>
@runSpecs(false, path.join(global.homeDir, 'github', 'atom'))
@runSpecs(false, path.join(app.getHomeDir(), 'github', 'atom'))
}
{ type: 'separator' }
{ label: 'Quit', accelerator: 'Command+Q', click: -> app.quit() }

View File

@@ -1,4 +1,5 @@
BrowserWindow = require 'browser-window'
app = require 'app'
dialog = require 'dialog'
ipc = require 'ipc'
path = require 'path'
@@ -38,7 +39,7 @@ class AtomWindow
''
]
paths.push path.join(global.homeDir, '.atom', 'packages')
paths.push path.join(app.getHomeDir(), '.atom', 'packages')
paths = paths.map (relativeOrAbsolutePath) ->
path.resolve resourcePath, relativeOrAbsolutePath

View File

@@ -9,8 +9,6 @@ optimist = require 'optimist'
nslog = require 'nslog'
_ = require 'underscore'
global.homeDir = app.getHomeDir()
console.log = (args...) ->
nslog(args.map((arg) -> JSON.stringify(arg)).join(" "))
@@ -84,7 +82,7 @@ parseCommandLine = ->
dev = true
resourcePath = args['resource-path']
else if dev
resourcePath = path.join(global.homeDir, 'github', 'atom')
resourcePath = path.join(app.getHomeDir(), 'github', 'atom')
try
fs.statSync resourcePath