diff --git a/package.json b/package.json index 28ae061..c8260e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-cucumber", "description": "Grunt task for running Cucumber.js", - "version": "0.2.1", + "version": "0.2.2", "homepage": "https://github.com/s9tpepper/grunt-cucumber-js", "author": { "name": "Omar Gonzalez", diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index 03c9f43..735fd57 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -12,13 +12,12 @@ module.exports = function (grunt) { var tags = options.tags; var format = options.format; var executable = options.executable; - + grunt.verbose.writeflags(options, 'Options'); var callback = function(succeeded) { - var code = succeeded ? 0 : 1; var exitFunction = function() { - done(code); + done(succeeded); }; // --- exit after waiting for all pending output --- @@ -42,7 +41,7 @@ module.exports = function (grunt) { var execOptions = ['node', 'node_modules/.bin/cucumber-js']; - + var _ = grunt.util._; if (! _.isEmpty(files)) { execOptions = execOptions.concat(files); @@ -62,7 +61,7 @@ module.exports = function (grunt) { execOptions.push('-f'); execOptions.push(format); } - + var cucumberPath = 'cucumber'; if (! _.isEmpty(executable)) { cucumberPath = executable;