mirror of https://github.com/nodejs/node.git
process: set _print_eval even when --eval is not passed
This is for scripts being fed from stdin: $ echo "{ foo: 'bar' }" | node -ppull/24503/head
parent
0b5235e68c
commit
ef3a874f41
|
@ -2209,7 +2209,11 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
|
|||
// -e, --eval
|
||||
if (eval_string) {
|
||||
process->Set(String::NewSymbol("_eval"), String::New(eval_string));
|
||||
process->Set(String::NewSymbol("_print_eval"), Boolean::New(print_eval));
|
||||
}
|
||||
|
||||
// -p, --print
|
||||
if (print_eval) {
|
||||
process->Set(String::NewSymbol("_print_eval"), True());
|
||||
}
|
||||
|
||||
if (force_repl) {
|
||||
|
|
Loading…
Reference in New Issue