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

There are still duplicates when using non-normalized paths in patterns #119

Closed
yannvgn opened this issue May 22, 2019 · 3 comments
Closed

Comments

@yannvgn
Copy link

yannvgn commented May 22, 2019

Hi Globby maintainers 👋

I'm having troubles when using non-normalized paths in patterns (like ./file.txt).

Let's assume the working directory contains the following files: file1.txt and file2.txt

globby.sync(['*', './file1.txt'])
// returns ['file1.txt', 'file2.txt', './file1.txt']
// where I'm expecting ['file1.txt', 'file2.txt']

I just wanted to raise the issue, though I'm not sure if this is an actual bug or if it's wanted.

Cheers

@mrmlnc
Copy link
Contributor

mrmlnc commented May 22, 2019

Most likely this is related to the fast-glob package. Yeap, it's true. We don't use resolved path in the cache for performance reasons (earlier). Right now I don't know we should do it or not.

const fg = require('.');

const entries = fg.sync(['*', './package.json']);

console.log(entries);

result

[                     
  './package.json',   
  'LICENSE',          
  'package-lock.json',
  'package.json',     
  'README.md',        
  'test.js',          
  'tsconfig.json',    
  'tslint.json'       
]                     

Please, move issue to the fast-glob repository.

@yannvgn
Copy link
Author

yannvgn commented May 22, 2019

Thanks. I've opened an issue in the fast-glob repo.
mrmlnc/fast-glob#190

@sindresorhus
Copy link
Owner

Closing in favor of mrmlnc/fast-glob#190

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

3 participants