Prevent Node from adding paths outside this app to search paths
This commit is contained in:
parent
9fe326ebeb
commit
01d2765e4b
5 changed files with 37 additions and 5 deletions
|
@ -9,12 +9,8 @@ process.atomBinding = (name) ->
|
|||
catch e
|
||||
process.binding "atom_common_#{name}" if /No such module/.test e.message
|
||||
|
||||
# Clear node's global search paths.
|
||||
globalPaths = Module.globalPaths
|
||||
globalPaths.length = 0
|
||||
|
||||
# Add common/api/lib to module search paths.
|
||||
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
|
||||
Module.globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
|
||||
|
||||
# setImmediate and process.nextTick makes use of uv_check and uv_prepare to
|
||||
# run the callbacks, however since we only run uv loop on requests, the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue