diff --git a/src/app/atom.coffee b/src/app/atom.coffee index b44bc4c95..93f2d78bc 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -90,16 +90,16 @@ _.extend atom, resolvePackagePath: (name) -> return name if fsUtils.isDirectory(name) + path = fsUtils.resolve(config.packageDirPaths..., name) - if fsUtils.isDirectory(path) - path - else - packagePath = fsUtils.join(window.resourcePath, 'node_modules', name) - packagePath if @isInternalPackage(packagePath) + return path if fsUtils.isDirectory(path) + + packagePath = fsUtils.join(window.resourcePath, 'node_modules', name) + return packagePath if @isInternalPackage(packagePath) isInternalPackage: (packagePath) -> {engines} = Package.loadMetadata(packagePath, true) - return packagePath if engines?.atom? + engines?.atom? getLoadedPackage: (name) -> @loadedPackages[name]