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

Case-insensitive globbing does not work on case-sensitive file systems #172

Closed
davidmerfield opened this issue Apr 27, 2019 · 2 comments
Closed
Assignees
Milestone

Comments

@davidmerfield
Copy link

davidmerfield commented Apr 27, 2019

Environment

  • OS Version: macOS 10.12.6
  • File system: Mac OS Extended (Case-sensitive, Journaled)
  • Node.js Version: v8.12.0
  • fast-glob Version: 2.2.6

Actual behavior

Case-insensitive globbing does not work on case-sensitive file systems.

Expected behavior

Case-insensitive globbing should work on case-sensitive file systems.

Steps to reproduce

  1. Create a case-sensitive volume on and mount it.
  2. Install fast-glob on the case-sensitive volume.
  3. Run the code sample on the case-sensitive volume.

Code sample

var fs = require("fs");
var fg = require("fast-glob");

fs.writeFileSync('A', "");

fg.sync('A'); 
// returns [ 'A' ]

// The documentation is ambiguous about how to enable 
// case-insensitive globbing. I include all four possible
// scenarios below since they all return an empty list and 
// at least one of them should not, per the docs.
fg.sync('a', { case: false});
fg.sync('a', { case: true});
fg.sync('a', { nocase: true});
fg.sync('a', { nocase: false});
// all return []
@davidmerfield davidmerfield changed the title Case-insensitivity not working Case-insensitive globbing does not work on case-sensitive file systems Apr 27, 2019
@mrmlnc mrmlnc self-assigned this Apr 27, 2019
@mrmlnc
Copy link
Owner

mrmlnc commented May 13, 2019

This behaviour related only to static patterns (without glob expression, like a.js or directory/a.js). And… yeap, it's a bug.

@mrmlnc
Copy link
Owner

mrmlnc commented May 13, 2019

This issue will be fixed with release fast-glob@2.2.7. You can check release issue #180.

@mrmlnc mrmlnc closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants