mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Replace global.homeDir with app.getHomeDir()
This commit is contained in:
@@ -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() }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user