From e598af705dd0e812d2ed8088c225d33233a9e5ab Mon Sep 17 00:00:00 2001 From: Julien Biezemans Date: Tue, 9 Apr 2013 12:44:39 +0200 Subject: [PATCH 1/2] Try fixing Travis CI build configuration --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9015aa46c..7baabd98e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,12 @@ rvm: "1.9.2" before_script: "git submodule update --init && npm install" script: "rake" +language: node_js + node_js: - - "0.6" - - "0.8" - "0.10" + - "0.8" + - "0.6" branches: only: From b585d4500dcc0f9f570000eaa9ecaca91abfd2e5 Mon Sep 17 00:00:00 2001 From: Simon Dean Date: Thu, 13 Jun 2013 19:34:31 +0100 Subject: [PATCH 2/2] Ensure no stdout output is lost Fixes issue #120 --- bin/cucumber.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/bin/cucumber.js b/bin/cucumber.js index 2a61219b5..04bfe626e 100755 --- a/bin/cucumber.js +++ b/bin/cucumber.js @@ -3,23 +3,8 @@ var Cucumber = require('../lib/cucumber'); var cli = Cucumber.Cli(process.argv); cli.run(function(succeeded) { var code = succeeded ? 0 : 1; - var exitFunction = function() { - process.exit(code); - }; - // --- exit after waiting for all pending output --- - var waitingIO = false; - process.stdout.on('drain', function() { - if (waitingIO) { - // the kernel buffer is now empty - exitFunction(); - } + process.on('exit', function() { + process.exit(code); }); - if (process.stdout.write("")) { - // no buffer left, exit now: - exitFunction(); - } else { - // write() returned false, kernel buffer is not empty yet... - waitingIO = true; - } });