exit.js 313 B

123456789101112131415
  1. 'use strict';
  2. // Fix stdout truncation on windows
  3. function exit(code) {
  4. /* istanbul ignore next */
  5. if (process.platform === 'win32' && process.stdout.bufferSize) {
  6. process.stdout.once('drain', function() {
  7. process.exit(code);
  8. });
  9. return;
  10. }
  11. process.exit(code);
  12. }
  13. module.exports = exit;