You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by js...@apache.org on 2015/03/06 18:46:53 UTC

cordova-lib git commit: CB-8602 plugman: publish fail early if unsupported npm is active

Repository: cordova-lib
Updated Branches:
  refs/heads/master 26c6f763e -> d2c99fc6c


CB-8602 plugman: publish fail early if unsupported npm is active


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

Branch: refs/heads/master
Commit: d2c99fc6ce4d0c1043e41c192fcdb4857e27b82d
Parents: 26c6f76
Author: Josh Soref <js...@blackberry.com>
Authored: Tue Mar 3 21:39:38 2015 -0500
Committer: Josh Soref <js...@blackberry.com>
Committed: Fri Mar 6 10:54:09 2015 -0500

----------------------------------------------------------------------
 cordova-lib/src/plugman/registry/registry.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/d2c99fc6/cordova-lib/src/plugman/registry/registry.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/registry/registry.js b/cordova-lib/src/plugman/registry/registry.js
index 9e08631..ad23ec4 100644
--- a/cordova-lib/src/plugman/registry/registry.js
+++ b/cordova-lib/src/plugman/registry/registry.js
@@ -19,7 +19,8 @@
 
 /* jshint laxcomma:true */
 
-var npm = require('npm'),
+var semver = require('semver'),
+    npm = require('npm'),
     path = require('path'),
     url = require('url'),
     fs = require('fs'),
@@ -36,6 +37,13 @@ var npm = require('npm'),
     plugmanCacheDir = path.resolve(plugmanConfigDir, 'cache'),
     oneDay = 3600*24;
 
+if (semver.compare(npm.version, '1.3.4') > 0) {
+    throw new Error('Unsupported npm version (' + npm.version + '). ' +
+       'Please downgrade to 1.3.4:\n' +
+       '\t(cd ' + path.dirname(path.dirname(path.dirname(__dirname))) +
+       ' && rm -rf ' + path.join('node_modules', 'npm') +
+       ' && npm install npm@1.3.4)');
+}
 
 module.exports = {
     settings: null,


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