mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-29 12:15:38 +08:00
Fix using common modules.
This commit is contained in:
@@ -2,7 +2,11 @@ path = require 'path'
|
||||
timers = require 'timers'
|
||||
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.
|
||||
globalPaths = Module.globalPaths
|
||||
|
||||
Reference in New Issue
Block a user