Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support for precedence setting.

  • Loading branch information...
commit 50283628c759dadfa323d23a6cc8fe83757b3490 1 parent f74a3dd
Sebastian Skałacki authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/watchr/script.rb
2  lib/watchr/script.rb
View
@@ -261,7 +261,7 @@ def path
# rules corresponding to `path`
#
def rules_for(path)
- @rules.reverse.select {|rule| path.match(rule.pattern) }
+ (@precedence == :last_match ? @rules.reverse : @rules).select{ |rule| path.match(rule.pattern) }
end
# Make a path relative to current working directory.
Please sign in to comment.
Something went wrong with that request. Please try again.