doc: clarify behavior of --watch-path and --watch flags · nodejs/node@62056d4

@@ -3076,6 +3076,10 @@ Use `--watch-path` to specify what paths to watch.

30763076

This flag cannot be combined with

30773077

`--check`, `--eval`, `--interactive`, or the REPL.

307830783079+

Note: The `--watch` flag requires a file path as an argument and is incompatible

3080+

with `--run` or inline script input, as `--run` takes precedence and ignores watch

3081+

mode. If no file is provided, Node.js will exit with status code `9`.

3082+30793083

```bash

30803084

node --watch index.js

30813085

```

@@ -3103,6 +3107,9 @@ combination with `--watch`.

31033107

This flag cannot be combined with

31043108

`--check`, `--eval`, `--interactive`, `--test`, or the REPL.

310531093110+

Note: Using `--watch-path` implicitly enables `--watch`, which requires a file path

3111+

and is incompatible with `--run`, as `--run` takes precedence and ignores watch mode.

3112+31063113

```bash

31073114

node --watch-path=./src --watch-path=./tests index.js

31083115

```