diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-03-26 19:05:32 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-03-26 19:06:58 -0700 |
commit | 698e795a5ffb617c5a3e3e79de7dfdd0ce637695 (patch) | |
tree | d88824fbb93516309224d0f162fb62157da00dd4 /lib/_debugger.js | |
parent | aad12d0b265c9b06ae029d6ee168849260a91dd6 (diff) | |
download | node-new-698e795a5ffb617c5a3e3e79de7dfdd0ce637695.tar.gz |
repl: fix 'terminal' mode autodetection on global repls
Fixes test/simple/test-force-repl.js
Diffstat (limited to 'lib/_debugger.js')
-rw-r--r-- | lib/_debugger.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js index dcf046bcf5..64ea20df6e 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -747,15 +747,18 @@ function Interface(stdin, stdout, args) { // Two eval modes are available: controlEval and debugEval // But controlEval is used by default - this.repl = repl.start({ + var opts = { prompt: 'debug> ', input: this.stdin, output: this.stdout, - terminal: !parseInt(process.env['NODE_NO_READLINE'], 10), eval: this.controlEval.bind(this), useGlobal: false, ignoreUndefined: true - }); + }; + if (parseInt(process.env['NODE_NO_READLINE'], 10)) { + opts.terminal = false; + } + this.repl = repl.start(opts); // Do not print useless warning repl._builtinLibs.splice(repl._builtinLibs.indexOf('repl'), 1); |