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

minimatch cache key computation seems wrong #9

Closed
gotwarlost opened this issue Jun 10, 2012 · 0 comments
Closed

minimatch cache key computation seems wrong #9

gotwarlost opened this issue Jun 10, 2012 · 0 comments

Comments

@gotwarlost
Copy link

  var cacheKey = pattern + "\n" + Object.keys(options).filter(function (k) {
    return options[k]
  }).join(":")

This creates a cachekey with the key names of all truthy options rather than their values (since it is using filter and not map).

Causes issues when two calls have the same pattern but only differ in the value of options.cwd

I guess it should be something like:

  var cacheKey = pattern + "\n" + Object.keys(options).map(function (k) {
    return k + '=' + options[k]
  }).join(":")
@isaacs isaacs closed this as completed in 274286d Oct 25, 2012
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

2 participants