cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/2] cordova-lib git commit: CB-12773: fixed incorrect plugin version fetching issue
Date Tue, 09 May 2017 19:01:48 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/7.0.x 5a4c43c26 -> aa1284bd5


CB-12773: fixed incorrect plugin version fetching issue


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

Branch: refs/heads/7.0.x
Commit: 877818ec06752e938253c1c439e43276f17e6afd
Parents: 5a4c43c
Author: Steve Gill <stevengill97@gmail.com>
Authored: Tue May 9 18:52:08 2017 +0100
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Tue May 9 19:59:52 2017 +0100

----------------------------------------------------------------------
 cordova-lib/src/cordova/plugin.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/877818ec/cordova-lib/src/cordova/plugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/plugin.js b/cordova-lib/src/cordova/plugin.js
index e76f479..b90a4d5 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -391,6 +391,7 @@ function determinePluginTarget(projectRoot, cfg, target, fetchOptions)
{
     }
     // Require project pkgJson.
     var pkgJsonPath = path.join(projectRoot, 'package.json');
+    var cordovaVersion = pkgJson.version;
     if(fs.existsSync(pkgJsonPath)) {
         pkgJson = cordova_util.requireNoCache(pkgJsonPath); 
     }
@@ -457,7 +458,7 @@ function determinePluginTarget(projectRoot, cfg, target, fetchOptions)
{
 
     return (shouldUseNpmInfo ? registry.info([id])
     .then(function(pluginInfo) {
-        return getFetchVersion(projectRoot, pluginInfo, pkgJson.version);
+        return getFetchVersion(projectRoot, pluginInfo, cordovaVersion);
     }) : Q(null))
     .then(function(fetchVersion) {
         return fetchVersion ? (id + '@' + fetchVersion) : target;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message