This commit is contained in:
Chen Shen
2015-09-17 09:52:00 -07:00
parent 02457990f1
commit 20dcdf77a4
10 changed files with 5 additions and 3 deletions

View File

@@ -598,10 +598,10 @@ class Package
nativeModulePaths = []
if @metadata._atomModuleCache?
nativeModuleBindingPaths = @metadata._atomModuleCache.extensions?['.node'] ?[]
nativeModuleBindingPaths = @metadata._atomModuleCache.extensions?['.node'] ? []
for nativeModuleBindingPath in nativeModuleBindingPaths
# The `.node` file lies in nativeModulePath/build/Release/ folder.
nativeModulePath = path.normalize(path.join(path.dirname(nativeModuleBindingPath), '..', '..'))
nativeModulePath = path.join(path.dirname(nativeModuleBindingPath), '..', '..')
nativeModulePaths.push(nativeModulePath) if @isNativeModule(nativeModulePath)
return nativeModulePaths