| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Test failure: 'should watch changes to a file from config file'
Location: test/sequential/test-watch-mode.mjs:872:3
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ '/Users/runner/work/node/node/node/out/Release/node: --watch requires specifying a file\n'
- ''
at TestContext.<anonymous> (file:///Users/runner/work/node/node/node/test/sequential/test-watch-mode.mjs:881:12)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Test.run (node:internal/test_runner/test:1389:7)
at async Suite.processPendingSubtests (node:internal/test_runner/test:960:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '/Users/runner/work/node/node/node/out/Release/node: --watch requires specifying a file\n',
expected: '',
operator: 'strictEqual',
diff: 'simple'
}
|
Sorry, something went wrong.
@aduh95 Thank you for pointing this out. I will look into the failing test and the commit message lint issue, then push an update. |
Sorry, something went wrong.
Signed-off-by: iclectic <tansonestost@yahoo.com>
|
Can you incorperate a fix for #64121 here too? |
Sorry, something went wrong.
| } else if (!test_runner && watch_mode_paths.empty() && argv->size() < 1) { | ||
| errors->push_back("--watch requires specifying a file"); |
There was a problem hiding this comment.
If we already have this check, why remove it? Wouldn't the better fix be to call this check function before REPL-ing?
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes: #64135
This updates watch mode option validation so that node --watch without a script exits with an option error instead of falling through to the REPL.
Previously, the validation checked whether the argument list had fewer than one item. However, the argument list still contains the Node executable itself, so node --watch was not treated as missing a script. The check now requires at least two arguments, meaning the executable plus a script file.
A regression test has been added to confirm that node --watch:
Tested with: