Fix using common modules.
This commit is contained in:
parent
6ddb8c00dc
commit
750148f7b4
1 changed files with 5 additions and 1 deletions
|
@ -2,7 +2,11 @@ path = require 'path'
|
||||||
timers = require 'timers'
|
timers = require 'timers'
|
||||||
Module = require 'module'
|
Module = require 'module'
|
||||||
|
|
||||||
process.atomBinding = (name) -> process.binding "atom_#{process.type}_#{name}"
|
process.atomBinding = (name) ->
|
||||||
|
try
|
||||||
|
process.binding "atom_#{process.type}_#{name}"
|
||||||
|
catch e
|
||||||
|
process.binding "atom_common_#{name}" if e.message is 'No such module'
|
||||||
|
|
||||||
# Add common/api/lib to module search paths.
|
# Add common/api/lib to module search paths.
|
||||||
globalPaths = Module.globalPaths
|
globalPaths = Module.globalPaths
|
||||||
|
|
Loading…
Add table
Reference in a new issue