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 2014/08/21 22:57:25 UTC
[2/3] git commit: CB-7362 Add Please run npm install from this
directory code
CB-7362 Add Please run npm install from this directory code
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/8eff249e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/8eff249e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/8eff249e
Branch: refs/heads/master
Commit: 8eff249e4188c0f616d428d791d9b0c935cdeb50
Parents: c0e57a8
Author: Josh Soref <js...@blackberry.com>
Authored: Thu Aug 21 16:04:42 2014 -0400
Committer: Josh Soref <js...@blackberry.com>
Committed: Thu Aug 21 16:53:32 2014 -0400
----------------------------------------------------------------------
main.js | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8eff249e/main.js
----------------------------------------------------------------------
diff --git a/main.js b/main.js
index 0475e09..13830d7 100755
--- a/main.js
+++ b/main.js
@@ -20,13 +20,26 @@
// copyright (c) 2013 Andrew Lunny, Adobe Systems
var path = require('path')
- , url = require('url')
, package = require(path.join(__dirname, 'package'))
- , nopt = require('nopt')
- , Q = require('q')
, help = require('./src/help')
- , cordova_lib = require('cordova-lib')
- , plugman = cordova_lib.plugman;
+ , url = require('url')
+ , nopt
+ , Q
+ , cordova_lib
+ , plugman;
+
+try {
+ nopt = require('nopt');
+ Q = require('q');
+ cordova_lib = require('cordova-lib');
+ plugman = cordova_lib.plugman;
+} catch(e) {
+ console.error(
+ 'Please run npm install from this directory:\n\t' +
+ __dirname
+ );
+ process.exit(2);
+}
var known_opts = { 'platform' : [ 'ios', 'android', 'amazon-fireos', 'blackberry10', 'wp8' , 'windows8', 'firefoxos' ]
, 'project' : path