Skip to content

Commit b2697b3

Browse files
committed
add extra delay on appveyor only
1 parent 53a0d95 commit b2697b3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cli.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ var chalk = require('chalk');
1111
var Promise = require('bluebird');
1212
var fork = require('./lib/fork');
1313
var log = require('./lib/logger');
14+
var delayBeforeExit = 0;
15+
16+
if (process.env.APPVEYOR && ! parseInt(process.version.slice(1), 10) > 0) {
17+
delayBeforeExit = 500;
18+
}
1419

1520
// Bluebird specific
1621
Promise.longStackTraces();
@@ -58,7 +63,7 @@ function error(error) {
5863

5964
setTimeout(function () {
6065
process.exit(1);
61-
}, 0);
66+
}, delayBeforeExit);
6267
}
6368

6469
function prefixTitle(file) {
@@ -181,7 +186,7 @@ function exit(results) {
181186
// timeout required to correctly flush stderr on Node 0.10 Windows
182187
setTimeout(function () {
183188
process.exit(failed > 0 || unhandledRejectionCount > 0 || uncaughtExceptionCount > 0 ? 1 : 0);
184-
}, 0);
189+
}, delayBeforeExit);
185190
}
186191

187192
function init(files) {

0 commit comments

Comments
 (0)