From 288a3be0d91a0da44a0f71ab3d7fbd41cbf7efdc Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 29 May 2015 19:01:06 +0400 Subject: [PATCH] fix c9 build failing silently --- plugins/c9.cli.publish/install.js | 2 +- plugins/c9.cli.publish/publish.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/c9.cli.publish/install.js b/plugins/c9.cli.publish/install.js index 5818af0d..669ac4c2 100644 --- a/plugins/c9.cli.publish/install.js +++ b/plugins/c9.cli.publish/install.js @@ -293,7 +293,7 @@ define(function(require, exports, module) { if (err) return callback(err); function installNPM(){ - spawn(join(process.env.HOME, ".c9/node/bin/npm"), { + spawn(join(process.env.HOME, process.platform == "win32"? ".c9/npm.cmd" : ".c9/node/bin/npm"), { args: ["install"], cwd: packagePath }, function(err) { diff --git a/plugins/c9.cli.publish/publish.js b/plugins/c9.cli.publish/publish.js index df55184d..ea80343d 100644 --- a/plugins/c9.cli.publish/publish.js +++ b/plugins/c9.cli.publish/publish.js @@ -159,7 +159,14 @@ define(function(require, exports, module) { } else { dryRun = true; - publish({local: true}, function(){}); + publish({local: true}, function(err){ + if (err) { + console.error(err); + if (!verbose) + console.error("\nTry running with --verbose flag for more information"); + process.exit(1); + } + }); } } }); @@ -296,8 +303,8 @@ define(function(require, exports, module) { warned = true; } else if (!fs.existsSync(join(cwd, name.replace(/\.js$/, "_test.js")))) { - console.warn("ERROR: Plugin '" + name + "' has no test associated with it. There must be a file called '" + name + "_test.js' containing tests."); - failed = true; + console.warn("ERROR: Plugin '" + name + "' has no test associated with it. There must be a file called '" + name.replace(/\.js$/, "") + "_test.js' containing tests."); + warned = true; } });