From 009148e24ddbe510ed17e61949d79399db6b4703 Mon Sep 17 00:00:00 2001 From: Heejin Date: Wed, 13 Apr 2016 19:11:05 +0900 Subject: [PATCH] Fix package control can't install dependencies --- app/main-es6/plugins/hain-package-manager/package-control.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main-es6/plugins/hain-package-manager/package-control.js b/app/main-es6/plugins/hain-package-manager/package-control.js index b68fa045..b07a19e7 100644 --- a/app/main-es6/plugins/hain-package-manager/package-control.js +++ b/app/main-es6/plugins/hain-package-manager/package-control.js @@ -1,5 +1,6 @@ 'use strict'; +const lo_size = require('lodash.size'); const fs = require('fs'); const co = require('co'); const got = require('got'); @@ -96,7 +97,7 @@ function* installPackage(packageName, versionRange, destDir, tempDir) { try { yield* downloadAndExtractPackage(packageName, versionRange, incompleteDir, tempDir); - if (data.dependencies && (data.dependencies.length > 0)) { + if (data.dependencies && (lo_size(data.dependencies) > 0)) { const modulePath = path.join(incompleteDir, 'node_modules'); yield fileutil.ensureDir(modulePath);