2
2
mirror of https://git.coolaj86.com/coolaj86/telebit.js.git synced 2025-03-03 07:00:45 +00:00

make 'press any key' last

This commit is contained in:
AJ ONeal 2018-06-28 03:46:54 -06:00
parent 28a66a9bd7
commit 18b2584728

View File

@ -561,18 +561,20 @@ function parseConfig(err, text) {
// need just a little time to let the grants occur
setTimeout(function () {
utils.putConfig('list', []);
// workaround for https://github.com/nodejs/node/issues/21319
if (answers._useTty) {
console.log();
console.log("Press any key to continue...");
console.log();
setTimeout(function () {
process.exit(0);
}, 2 * 1000);
}
// end workaround
utils.putConfig('list', [], function (err) {
if (err) { console.error(err); return; }
console.log("Success");
// workaround for https://github.com/nodejs/node/issues/21319
if (answers._useTty) {
setTimeout(function () {
console.log();
console.log("Press any key to continue...");
console.log();
process.exit(0);
}, 0.5 * 1000);
}
// end workaround
});
}, 1 * 1000);
});