mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Setup NODE_PATH when restarting render process
Without this the NODE_PATH env var will possibly be wrong when restarting a window after another window has been opened that has a different NODE_PATH value. Close #630
This commit is contained in:
@@ -18,12 +18,16 @@ class AtomWindow
|
||||
isSpec: null
|
||||
|
||||
constructor: (settings={}) ->
|
||||
{resourcePath, pathToOpen, @isSpec} = settings
|
||||
{@resourcePath, pathToOpen, @isSpec} = settings
|
||||
global.atomApplication.addWindow(this)
|
||||
|
||||
@setupNodePath(resourcePath)
|
||||
@setupNodePath(@resourcePath)
|
||||
@createContextMenu()
|
||||
@browserWindow = new BrowserWindow show: false, title: 'Atom'
|
||||
@browserWindow.restart = _.wrap _.bind(@browserWindow.restart, @browserWindow), (restart) =>
|
||||
@setupNodePath(@resourcePath)
|
||||
restart()
|
||||
|
||||
@handleEvents()
|
||||
|
||||
loadSettings = _.extend({}, settings)
|
||||
@@ -35,7 +39,7 @@ class AtomWindow
|
||||
|
||||
@browserWindow.loadSettings = loadSettings
|
||||
@browserWindow.once 'window:loaded', => @loaded = true
|
||||
@browserWindow.loadUrl "file://#{resourcePath}/static/index.html"
|
||||
@browserWindow.loadUrl "file://#{@resourcePath}/static/index.html"
|
||||
|
||||
@openPath(pathToOpen)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user