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

Inconsistency when run in root drive path /, prefixes match with / #584

Closed
reggi opened this issue May 6, 2024 · 3 comments
Closed

Inconsistency when run in root drive path /, prefixes match with / #584

reggi opened this issue May 6, 2024 · 3 comments

Comments

@reggi
Copy link

reggi commented May 6, 2024

πŸ‘‹ First off thanks for your work on glob. πŸ™

There's a bug in npm workspaces that I tracked back to this unexpected result in glob.

Here's an easy way to demonstrate the issue:

➜  Desktop deno eval 'import("npm:[email protected]").then(({ glob }) => glob("bin")).then(console.log)'
[ "bin" ]
➜  Desktop cd /
➜  / deno eval 'import("npm:[email protected]").then(({ glob }) => glob("bin")).then(console.log)'
[ "/bin" ]

When run in ~/Desktop it's matching the folder bin, and when run in / it's matching /bin.

Is this expected behavior?

@isaacs
Copy link
Owner

isaacs commented May 9, 2024

Interesting, so the issue is that an entry in / has the / prefix attached to it?

That's not expected, no. Definitely a bug, because it's not how bash 5 does it.

@reggi
Copy link
Author

reggi commented May 9, 2024

@isaacs yep! thats the issue!

@isaacs
Copy link
Owner

isaacs commented May 9, 2024

Fixed in latest :)

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