You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/07/29 02:18:07 UTC

git commit: small refactor for missing code block after conditional statement

Repository: cordova-lib
Updated Branches:
  refs/heads/master 44ca4bf47 -> cbc89f88c


small refactor for missing code block after conditional statement


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/cbc89f88
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/cbc89f88
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/cbc89f88

Branch: refs/heads/master
Commit: cbc89f88c731d9264bd3e18a2d576feb03e45a37
Parents: 44ca4bf
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Jul 28 17:17:06 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Jul 28 17:17:06 2014 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/install.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cbc89f88/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index f0c0c4f..a13c1e2 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -85,9 +85,7 @@ module.exports = function installPlugin(platform, project_dir, id, plugins_dir,
 function possiblyFetch(id, plugins_dir, options) {
 
     // if plugin is a relative path, check if it already exists
-    var plugin_src_dir = path.join(plugins_dir, id);
-    if( isAbsolutePath(id) )
-        plugin_src_dir = id;
+    var plugin_src_dir = isAbsolutePath(id) ? id : path.join(plugins_dir, id);
 
     // Check that the plugin has already been fetched.
     if (fs.existsSync(plugin_src_dir)) {