You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes sure that the described default behavior for the
`terminal` option is actually always used and not only when running
the REPL as standalone program.
The options code is now logically combined instead of being spread
out in the big REPL constructor.
PR-URL: #26518
Reviewed-By: Lance Ball <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Copy file name to clipboardExpand all lines: lib/internal/repl.js
+8-12Lines changed: 8 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ function createRepl(env, opts, cb) {
14
14
opts={
15
15
[kStandaloneREPL]: true,
16
16
ignoreUndefined: false,
17
-
terminal: process.stdout.isTTY,
18
17
useGlobal: true,
19
18
breakEvalOnSigint: true,
20
19
...opts
@@ -23,17 +22,13 @@ function createRepl(env, opts, cb) {
23
22
if(parseInt(env.NODE_NO_READLINE)){
24
23
opts.terminal=false;
25
24
}
26
-
// The "dumb" special terminal, as defined by terminfo, doesn't support
27
-
// ANSI color control codes.
28
-
// see http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials
Copy file name to clipboardExpand all lines: lib/internal/tty.js
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,9 @@ function getColorDepth(env = process.env) {
114
114
if(env.NODE_DISABLE_COLORS!==undefined||
115
115
// See https://no-color.org/
116
116
env.NO_COLOR!==undefined||
117
+
// The "dumb" special terminal, as defined by terminfo, doesn't support
118
+
// ANSI color control codes.
119
+
// See http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials
0 commit comments