Skip to content

Commit 2e28875

Browse files
committed
Revert "repl: disable Ctrl+C support on win32 for now"
This reverts commit f59b888 now that the libuv update containing the proper fix has landed in 63243bc. Ref: libuv/libuv#1054 Ref: #7837 PR-URL: #8645 Reviewed-By: Nikolai Vavilov <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 367065b commit 2e28875

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/repl.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,7 @@ function REPLServer(prompt,
289289
if (!err) {
290290
// Unset raw mode during evaluation so that Ctrl+C raises a signal.
291291
let previouslyInRawMode;
292-
293-
// Temporarily disabled on Windows due to output problems that likely
294-
// result from the raw mode switches here, see
295-
// https://github.com/nodejs/node/issues/7837
296-
// Setting NODE_REPL_CTRLC is meant as a temporary opt-in for debugging.
297-
if (self.breakEvalOnSigint &&
298-
(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {
292+
if (self.breakEvalOnSigint) {
299293
// Start the SIGINT watchdog before entering raw mode so that a very
300294
// quick Ctrl+C doesn’t lead to aborting the process completely.
301295
utilBinding.startSigintWatchdog();
@@ -315,8 +309,7 @@ function REPLServer(prompt,
315309
result = script.runInContext(context, scriptOptions);
316310
}
317311
} finally {
318-
if (self.breakEvalOnSigint &&
319-
(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {
312+
if (self.breakEvalOnSigint) {
320313
// Reset terminal mode to its previous value.
321314
self._setRawMode(previouslyInRawMode);
322315

0 commit comments

Comments
 (0)