Skip to content
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 fires when a directory is created in the same directory as a file target #519

Open
SCdF opened this issue Sep 7, 2016 · 2 comments

Comments

@SCdF
Copy link

SCdF commented Sep 7, 2016

Test case repository: https://github.com/SCdF/grunt-contrib-watch-watches-dirs-by-mistake

Basically, given the following watch config:

watch: {
  shouldFire: {
    files: ['shouldFire', 'shouldFireDir/shouldFire'],
    tasks: ['printstuff']
  }
}

I would expect that only two files could cause the task to fire: the shouldFire file and the second shouldFire file under the shouldFireDir directory.

However, the task is fired if a directory is created in either the repo's root directory, or under the shouldFireDir directory. For example, if I mkdir blah in the root directory, this task fires. Note that this issue only occurs if you create a directory: touching a file does not cause the task to incorrectly fire.

Either this is incorrect or I do not understand how the files matching syntax works.

@SCdF
Copy link
Author

SCdF commented Sep 8, 2016

Looks like this is caused by Gaze: shama/gaze#204

@SCdF
Copy link
Author

SCdF commented Sep 8, 2016

Created the following PR to work around Gaze: #520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant