Skip to content

--watch-path also watches --env file directory tree in >=22.7 #55913

@gorankarlic

Description

@gorankarlic

Version

22.7.0

Platform

Darwin Users-MacBook-Air-2.local 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:37:13 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T8112 arm64

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 the lib 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions