You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/05 16:22:05 UTC
git commit: CB-5343 Tell people to run npm install when requirements
are missing
Updated Branches:
refs/heads/master 14631d459 -> a85adb610
CB-5343 Tell people to run npm install when requirements are missing
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/a85adb61
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/a85adb61
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/a85adb61
Branch: refs/heads/master
Commit: a85adb610ef08eeaf073474ebfce08864390b52c
Parents: 14631d4
Author: Josh Soref <js...@blackberry.com>
Authored: Mon Nov 11 14:35:56 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Dec 5 10:21:57 2013 -0500
----------------------------------------------------------------------
coho | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/a85adb61/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index a879892..559a209 100755
--- a/coho
+++ b/coho
@@ -18,11 +18,17 @@ specific language governing permissions and limitations
under the License.
*/
-var fs = require('fs');
-var optimist = require('optimist');
-var path = require('path');
-var shjs = require('shelljs');
-var request = require('request');
+try {
+ var fs = require('fs');
+ var optimist = require('optimist');
+ var path = require('path');
+ var shjs = require('shelljs');
+ var request = require('request');
+} catch (e) {
+ console.log("Please run npm install from this directory:\n\t" +
+ __dirname);
+ process.exit(2);
+}
var origWorkingDir = process.cwd();