Still set NODE_PATH since tasks may need it.

This commit is contained in:
Cheng Zhao
2014-03-18 15:38:57 +08:00
parent 87b95128f9
commit cc2e1eecd3

View File

@@ -149,7 +149,10 @@ class Atom extends Model
configDirPath = @getConfigDirPath()
# Add 'src/exports' to module search path.
require('module').globalPaths.push(path.resolve(resourcePath, 'exports'))
exportsPath = path.resolve(resourcePath, 'exports')
require('module').globalPaths.push(exportsPath)
# Still set NODE_PATH since tasks may need it.
process.env.NODE_PATH = exportsPath
@config = new Config({configDirPath, resourcePath})
@keymap = new Keymap({configDirPath, resourcePath})