Skip to content

Commit

Permalink
fix: rejects readline question promise on abortion
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVenable committed Jun 24, 2024
1 parent eb54c54 commit 8445809
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/readline/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class Interface extends _Interface {
};
}

this.on('close', () => {
reject(new AbortError('Interrupted'));
});

this[kQuestion](query, cb);
});
}
Expand Down

0 comments on commit 8445809

Please sign in to comment.