From 7ab4c69df981e1df9607f201b0597bb5779c6017 Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Tue, 31 Jan 2017 13:38:10 -0800 Subject: [PATCH] style: updated when console log updates user --- hooks/lib/npm/nodeDependencies.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/lib/npm/nodeDependencies.js b/hooks/lib/npm/nodeDependencies.js index 2fb3d0b3..8114357f 100644 --- a/hooks/lib/npm/nodeDependencies.js +++ b/hooks/lib/npm/nodeDependencies.js @@ -26,13 +26,13 @@ dependencies = require(path.join(context.opts.projectRoot, 'plugins', context.opts.plugin.id, 'package.json')).dependencies // only run once - if (getPackageInstalled()) { - return - } + if (getPackageInstalled()) return // install node modules - console.log('BRANCH SDK: Installing node dependencies') var modules = getNodeModulesToInstall(dependencies) + if (modules.length === 0) return deferral.promise + + console.log('BRANCH SDK: Installing node dependencies') installNodeModules(modules, function (err) { if (err) { // handle error