Skip to content

bootstrap_node.js: Make reading from stdin configurable #34

@cmfcmf

Description

@cmfcmf

Currently, Node.js is hacked to never read from stdin:

if (true) {
// TODO (cf): This should only happen if we run node via node::lib::Initialize().
// It should not run if we call node::lib::Start().
// Do nothing. Calling evalScript is necessary however, because it sets
// globals.require to the require function.
// Otherwise, require doesn't work.
console.log('Embedded mode');
evalScript('[eval]');
// If -i or --interactive were passed, or stdin is a TTY.
} else if (process._forceRepl || NativeModule.require('tty').isatty(0)) {

Add a command line parameter (?) to toggle this behaviour.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions