-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--watch-path
also watches --env
file directory tree in >=22.7
#55913
Comments
I'm not able to reproduce. |
I have discovered that the issue is a bit more convoluted and indeed can not be reproduced as stated above. In order to reproduce the issue two conditions must be met:
node --env-file sub/dev.env --watch-path /usr/local/bin --watch-preserve-output index.js In this case Node 22.7 and above erroneously starts watching the directory tree where the environment file (in this case Please find attached a complete example 55913.zip that can be used with the above description to reliably reproduce the issue. |
Hey @gorankarlic, could you please provide the repro as a public repository? 😊 |
Please find the public repository with the reproducible at https://github.com/gorankarlic/55913. |
Thanks @gorankarlic 😊 |
--watch-path
broken starting with version 22.7--watch-path
also watches --env
file directory tree in >=22.7
Version
22.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
When running
node --watch-path lib test.js
with 22.6.0 it behaves as expected (restarts only when a file changes in thelib
directory).When running
node --watch-path lib test.js
with 22.7.0 it keeps restarting indefinitely.How often does it reproduce? Is there a required condition?
Always reproducible.
What is the expected behavior? Why is that the expected behavior?
Should only restart when a file changes in the watched directory.
What do you see instead?
Restarting indefinitely in a loop.
Additional information
No response
The text was updated successfully, but these errors were encountered: