Closed
Description
- Version: all
- Platform: all
- Subsystem: internal/bootstrap_node.js
-c, --check
Syntax check the script without executing.
The node --check
flag is supposed to check syntax and then stop. However, as currently implemented the --check
flag is ignored if the script to be checked is given via stdin or via -e
flag; and the script is executed regardless.
For instance:
$ echo 'console.log("hello")' | node --check
$ node --check -e 'console.log("hello")'
- Expected behaviour: nothing prints (but any syntax errors are reported)
- Actual behaviour: "hello" is printed to stdout in both cases