gwqadd 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gwqadd.mjs +3 -2
- package/package.json +1 -1
package/bin/gwqadd.mjs
CHANGED
|
@@ -479,8 +479,6 @@ process.on('uncaughtException', (err) => {
|
|
|
479
479
|
});
|
|
480
480
|
|
|
481
481
|
async function waitForKey() {
|
|
482
|
-
process.stdin.removeAllListeners('data');
|
|
483
|
-
process.stdin.removeAllListeners('keypress');
|
|
484
482
|
try {
|
|
485
483
|
process.stdin.setRawMode(true);
|
|
486
484
|
rawModeEngaged = true;
|
|
@@ -519,6 +517,9 @@ async function askLine(question, initial = '') {
|
|
|
519
517
|
const answer = rl.question(question);
|
|
520
518
|
if (initial) rl.write(initial);
|
|
521
519
|
return (await answer).trim();
|
|
520
|
+
} catch (err) {
|
|
521
|
+
if (err?.code === 'ABORT_ERR') die('E_INTERRUPTED', 'cancelled');
|
|
522
|
+
throw err;
|
|
522
523
|
} finally {
|
|
523
524
|
rl.close();
|
|
524
525
|
}
|