nodejitsu/forever — Issue #164: minimatch option matchBase being used improperly in _watchFilter
Author: dbarnhart
Created: 2011-11-17 02:55:08+00:00
State: open

matchBase is a boolean option that indicates if patterns not containing slashes should be matched against the basename of the path. It is not a prefix for matching patterns, for example. Therefore, patterns relative to the application folder (e.g. "public/*") will always fail.

Instead, I suggest the watchDirectory path should be trimmed from the start of file paths before they are passed to minimatch. I assume the intention here is to same semantics similar to .gitignore.

Usage of matchBase in minimatch:
https://github.com/isaacs/minimatch
https://github.com/isaacs/minimatch/blob/master/minimatch.js#L83

Usage of matchBase in forever:
https://github.com/nodejitsu/forever/blob/master/lib/forever/monitor.js#L479