-
Notifications
You must be signed in to change notification settings - Fork 483
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
Handling of multiple watchdirs is undefined #634
Labels
Comments
Merged
"Extreme" example (related to above example):
Guard should call plugin's run_on_modification with |
lesniakania
pushed a commit
to lesniakania/guard
that referenced
this issue
Oct 14, 2014
lesniakania
pushed a commit
to lesniakania/guard
that referenced
this issue
Oct 18, 2014
lesniakania
pushed a commit
to lesniakania/guard
that referenced
this issue
Oct 18, 2014
fixed on master |
Fix released |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TL;DR - avoid using multiple watched directories for now (-w option). If possible, watch the entire project and use "smarter" rules or custom plugins.
Example:
Given a tree:
watching
/project
and/project/modules
, e.g.results in ambiguous or non-existent relative paths passed to plugins, e.g.
triggers the event:
Problem
Working with relative paths is more convenient (matching regexps in Guardfile), although the concept of multiple watch dirs breaks this.
Workaround
Reorganizing projects and directories to avoid needing multiple watched dirs with custom rules/configurations (consider multiple Guardfiles rather than multiple watch dirs).
Proper solution
Probably a
directory
keyword (similar to the idea of the existinggroup
keyword) could allow having different plugin configurations for different directories.Alternative solution
All paths and regexps should be either assumed relative to the given working directory, or absolute (if outside the project).
The text was updated successfully, but these errors were encountered: