From 22ef46215a1d26d4e3d26eab266fd22536670898 Mon Sep 17 00:00:00 2001 From: Paulo Fernando Date: Wed, 23 Mar 2016 16:17:00 -0300 Subject: [PATCH 1/3] SONAR_RUNNER_JAR path fix --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dd19a37..fe9ac59 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ module.exports = function (options) { SONAR_VERSION = "2.4"; SONAR_RUNNER_HOME = path.join(__dirname, format('/sonar-runner-%s', SONAR_VERSION)); SONAR_RUNNER_JAR = format('/lib/sonar-runner-dist-%s.jar', SONAR_VERSION); - SONAR_RUNNER_COMMAND = 'java -jar ' + path.join(SONAR_RUNNER_HOME, SONAR_RUNNER_JAR) + ' -X -Drunner.home=' + SONAR_RUNNER_HOME; + SONAR_RUNNER_COMMAND = 'java -jar "' + path.join(SONAR_RUNNER_HOME, SONAR_RUNNER_JAR) + '" -X -Drunner.home=' + SONAR_RUNNER_HOME; write = function (file, enc, cb) { // do nothing with source ... not needed From b25a7f1bfcff109c42971cdfdce68218432f4c8f Mon Sep 17 00:00:00 2001 From: Paulo Fernando Date: Thu, 24 Mar 2016 08:23:15 -0300 Subject: [PATCH 2/3] SONAR_RUNNER_HOME path fix --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fe9ac59..adf847a 100644 --- a/index.js +++ b/index.js @@ -18,7 +18,7 @@ module.exports = function (options) { SONAR_VERSION = "2.4"; SONAR_RUNNER_HOME = path.join(__dirname, format('/sonar-runner-%s', SONAR_VERSION)); SONAR_RUNNER_JAR = format('/lib/sonar-runner-dist-%s.jar', SONAR_VERSION); - SONAR_RUNNER_COMMAND = 'java -jar "' + path.join(SONAR_RUNNER_HOME, SONAR_RUNNER_JAR) + '" -X -Drunner.home=' + SONAR_RUNNER_HOME; + SONAR_RUNNER_COMMAND = 'java -jar "' + path.join(SONAR_RUNNER_HOME, SONAR_RUNNER_JAR) + '" -X -Drunner.home="' + SONAR_RUNNER_HOME + '"'; write = function (file, enc, cb) { // do nothing with source ... not needed From f1ad1253e005b75e11cedae7618460d0a68bb2c1 Mon Sep 17 00:00:00 2001 From: Paulo Fernando Date: Tue, 10 May 2016 16:09:53 -0300 Subject: [PATCH 3/3] Fix: handle exit code equals null --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index adf847a..e976d4a 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ module.exports = function (options) { gutil.log(c); }); process.on('exit', function (code) { - if (code !== 0) { + if (!!code && code !== 0) { gutil.log(format('Return code: %d.', code)); throw new PluginError('gulp-sonar', format('Return code: %d.', code)); }