diff --git a/src/atom-application.coffee b/src/atom-application.coffee index b4fdfef81..0b3936ad7 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -46,7 +46,6 @@ class AtomApplication @windows = [] @listenForArgumentsFromNewProcess() - @setupNodePath() @setupJavaScriptArguments() @buildApplicationMenu() @handleEvents() @@ -69,29 +68,6 @@ class AtomApplication addWindow: (window) -> @windows.push window - getHomeDir: -> - process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME'] - - setupNodePath: -> - resourcePaths = [ - 'src/stdlib' - 'src/app' - 'src/packages' - 'src' - 'vendor' - 'static' - 'node_modules' - 'spec' - '' - ] - - resourcePaths.push path.join(@getHomeDir(), '.atom', 'packages') - - resourcePaths = resourcePaths.map (relativeOrAbsolutePath) => - path.resolve @resourcePath, relativeOrAbsolutePath - - process.env['NODE_PATH'] = resourcePaths.join path.delimiter - listenForArgumentsFromNewProcess: -> fs.unlinkSync socketPath if fs.existsSync(socketPath) server = net.createServer (connection) => diff --git a/src/atom-window.coffee b/src/atom-window.coffee index e4e156ec2..4f7519d81 100644 --- a/src/atom-window.coffee +++ b/src/atom-window.coffee @@ -11,6 +11,7 @@ class AtomWindow constructor: ({bootstrapScript, resourcePath, pathToOpen, exitWhenDone, @isSpec}) -> global.atomApplication.addWindow(this) + @setupNodePath(resourcePath) @browserWindow = new BrowserWindow show: false, title: 'Atom' @handleEvents() @@ -24,6 +25,26 @@ class AtomWindow @openPath(pathToOpen) + setupNodePath: (resourcePath) -> + paths = [ + 'src/stdlib' + 'src/app' + 'src/packages' + 'src' + 'vendor' + 'static' + 'node_modules' + 'spec' + '' + ] + + paths.push path.join(global.homeDir, '.atom', 'packages') + + paths = paths.map (relativeOrAbsolutePath) -> + path.resolve resourcePath, relativeOrAbsolutePath + + process.env['NODE_PATH'] = paths.join path.delimiter + getInitialPath: -> @browserWindow.loadSettings.initialPath diff --git a/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee b/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee index 421e547bd..2173a8296 100644 --- a/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee +++ b/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee @@ -7,7 +7,7 @@ $ = require 'jquery' fsUtils = require 'fs-utils' path = require 'path' -describe 'FuzzyFinder', -> +fdescribe 'FuzzyFinder', -> [finderView] = [] beforeEach ->