From 7a65e8ca656f362a73d03d1954b9665d43c09528 Mon Sep 17 00:00:00 2001 From: Maarten Hus Date: Fri, 27 Feb 2015 09:27:31 +0100 Subject: [PATCH] When an error occurs the tasks is automatically stopped using grunt.warn. This closes #11. --- tasks/karma_sonar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/karma_sonar.js b/tasks/karma_sonar.js index 120a917..5ecd775 100644 --- a/tasks/karma_sonar.js +++ b/tasks/karma_sonar.js @@ -32,7 +32,7 @@ module.exports = function (grunt) { var content = grunt.file.read(source.coverageReport); return content.replace(/SF:\./ig, 'SF:' + (source.prefix || '.')); } else { - grunt.log.error(source.coverageReport + " does not exist."); + grunt.warn(source.coverageReport + " does not exist."); return null; } } @@ -88,7 +88,7 @@ module.exports = function (grunt) { return content; } else { - grunt.log.error(source.testReport + " does not exist."); + grunt.warn(source.testReport + " does not exist."); return null; } } @@ -196,7 +196,7 @@ module.exports = function (grunt) { } }, function (error, result, code) { if (code !== 0) { - return grunt.log.error('The following error occured while trying to upload to sonar: ' + error); + return grunt.warn('The following error occured while trying to upload to sonar: ' + error); } else { grunt.log.writeln('Uploaded information to sonar.'); }