File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ module.paths = require('module')._nodeModulePaths(module.filename);
26
26
27
27
function createRepl ( env , cb ) {
28
28
const opts = {
29
- useGlobal : true ,
30
- ignoreUndefined : false
29
+ ignoreUndefined : false ,
30
+ terminal : process . stdout . isTTY ,
31
+ useGlobal : true
31
32
} ;
32
33
33
34
if ( parseInt ( env . NODE_NO_READLINE ) ) {
@@ -57,8 +58,8 @@ function createRepl(env, cb) {
57
58
}
58
59
59
60
const repl = REPL . start ( opts ) ;
60
- if ( opts . terminal && env . NODE_REPL_HISTORY_PATH ) {
61
- return setupHistory ( repl , env . NODE_REPL_HISTORY_PATH , cb ) ;
61
+ if ( opts . terminal && env . NODE_REPL_HISTORY_FILE ) {
62
+ return setupHistory ( repl , env . NODE_REPL_HISTORY_FILE , cb ) ;
62
63
}
63
64
repl . _historyPrev = _replHistoryMessage ;
64
65
cb ( null , repl ) ;
@@ -158,7 +159,7 @@ function _replHistoryMessage() {
158
159
if ( this . history . length === 0 ) {
159
160
this . _writeToOutput (
160
161
'\nPersistent history support disabled. ' +
161
- 'Set the NODE_REPL_HISTORY_PATH environment variable to ' +
162
+ 'Set the NODE_REPL_HISTORY_FILE environment variable to ' +
162
163
'a valid, user-writable path to enable.\n'
163
164
) ;
164
165
this . _refreshLine ( ) ;
You can’t perform that action at this time.
0 commit comments