module.exports = function (message, callback) {
  var interrupted = false;
  var signal = process.platform.indexOf('win') >= 0 ? "exit" : "SIGINT";
  process.on(signal, function () {
    if (interrupted) {
      process.exit();
    }
    console.log(message + " Interrupt a second time to quit");
    interrupted = true;
    setTimeout(function () {
      interrupted = false;
      callback();
    }, 1500);
  });
};

module.exports = function (message, callback) {
  var interrupted = false;
  var signal = process.platform === "win32" ? "exit" : "SIGINT";
  process.on(signal, function () {
    if (interrupted) {
      process.exit();
    }
    console.log(message + " Interrupt a second time to quit");
    interrupted = true;
    setTimeout(function () {
      interrupted = false;
      callback();
    }, 1500);
  });
};

Fix interrupt on OS X
Fix interrupt on OS X

 - system id 'darwin' contains the phrase 'win' too
 - check for 'win32' instead
