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

nocase:true not working properly on linux #526

Closed
aabluedragon opened this issue May 4, 2023 · 5 comments
Closed

nocase:true not working properly on linux #526

aabluedragon opened this issue May 4, 2023 · 5 comments

Comments

@aabluedragon
Copy link

For the given example, let's say we have the following directory in our file system (linux)
/home/myusername/app/StylES
The following code will not find this entry:

const results = glob.globSync('styles', {cwd:"/home/myusername/app", nocase:true});
console.log(results.length) // prints 0
@isaacs
Copy link
Owner

isaacs commented May 4, 2023

Does it work if you add nocaseMagicOnly: false to the options?

@aabluedragon
Copy link
Author

aabluedragon commented May 4, 2023

TypeScript says 'nocaseMagicOnly' does not exist in type 'GlobOptions'
Either way, I tried and it didn't work.

@isaacs
Copy link
Owner

isaacs commented May 5, 2023 via email

@aabluedragon
Copy link
Author

aabluedragon commented May 7, 2023

@isaacs
So, is it planned to fix nocase:true to work over linux as well, or support nocaseMagicOnly to overcome it?
This is a very useful feature to have on case sensitive operating systems.

@isaacs
Copy link
Owner

isaacs commented May 7, 2023

Fix it in Linux. Basically, have glob set nocaseMagicOnly as appropriate, based on both the platform and nocase.

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