mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
make "node --eval" eval in the global scope.
This commit is contained in:
parent
67652ddf27
commit
fd70d30a9c
@ -601,7 +601,8 @@ if (process.argv[1]) {
|
||||
|
||||
} else if (process._eval) {
|
||||
// -e, --eval
|
||||
if (process._eval) console.log(eval(process._eval));
|
||||
var indirectEval= eval; // so the eval happens in global scope.
|
||||
if (process._eval) console.log(indirectEval(process._eval));
|
||||
} else {
|
||||
// REPL
|
||||
module.requireNative('repl').start();
|
||||
|
Loading…
Reference in New Issue
Block a user