function createRepl(env, cb) {
const opts = {
- useGlobal: true,
- ignoreUndefined: false
+ ignoreUndefined: false,
+ terminal: process.stdout.isTTY,
+ useGlobal: true
};
if (parseInt(env.NODE_NO_READLINE)) {
}
const repl = REPL.start(opts);
- if (opts.terminal && env.NODE_REPL_HISTORY_PATH) {
- return setupHistory(repl, env.NODE_REPL_HISTORY_PATH, cb);
+ if (opts.terminal && env.NODE_REPL_HISTORY_FILE) {
+ return setupHistory(repl, env.NODE_REPL_HISTORY_FILE, cb);
}
repl._historyPrev = _replHistoryMessage;
cb(null, repl);
if (this.history.length === 0) {
this._writeToOutput(
'\nPersistent history support disabled. ' +
- 'Set the NODE_REPL_HISTORY_PATH environment variable to ' +
+ 'Set the NODE_REPL_HISTORY_FILE environment variable to ' +
'a valid, user-writable path to enable.\n'
);
this._refreshLine();