You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/05/09 18:58:17 UTC
cordova-lib git commit: CB-12773: fixed incorrect plugin version
fetching issue
Repository: cordova-lib
Updated Branches:
refs/heads/master be7f7ac6d -> fc32d62a2
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/fc32d62a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/fc32d62a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/fc32d62a
Branch: refs/heads/master
Commit: fc32d62a262c90497ec83fe61e07b5717d8e81bf
Parents: be7f7ac
Author: Steve Gill <st...@gmail.com>
Authored: Tue May 9 18:52:08 2017 +0100
Committer: Steve Gill <st...@gmail.com>
Committed: Tue May 9 18:52:08 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/fc32d62a/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