We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4207bd4 commit da5c977Copy full SHA for da5c977
bin/cucumber.js
@@ -3,23 +3,8 @@ var Cucumber = require('../lib/cucumber');
3
var cli = Cucumber.Cli(process.argv);
4
cli.run(function(succeeded) {
5
var code = succeeded ? 0 : 1;
6
- var exitFunction = function() {
7
- process.exit(code);
8
- };
9
10
- // --- exit after waiting for all pending output ---
11
- var waitingIO = false;
12
- process.stdout.on('drain', function() {
13
- if (waitingIO) {
14
- // the kernel buffer is now empty
15
- exitFunction();
16
- }
+ process.on('exit', function() {
+ process.exit(code);
17
});
18
- if (process.stdout.write("")) {
19
- // no buffer left, exit now:
20
21
- } else {
22
- // write() returned false, kernel buffer is not empty yet...
23
- waitingIO = true;
24
25
0 commit comments