-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
symlinks are not followed since 4.0.6? #134
Comments
Symlinked directories are no longer explored. This is the same behavior as Bash 4.3. If you find a case where it doesn't behave the same as Bash 4.3, then please let me know. Otherwise yes, this is by design. See the discussion in #86 |
If you rely on this behavior you should pin your glob dependency version at |
I'm also having trouble with this change, and I don't believe it matches the behavior of bash 4.3 either. How did you test against Bash's behavior? Below is a quick example of how globstar functions for me in bash 4.3.30. Pastebin with a demo of how bash 4.3 is handling symlinks: http://pastebin.com/YAq8wQyK |
Indeed, you've found a discrepancy between bash 4.3 and node-glob! This is a bug! Posted as #135 The solution is not "follow symlinked dirs" as suggested in the OP here. The correct behavior is "stop following symlinked dirs as part of a globstar match, but still resolve their contents against subsequent parts of pattern". |
@isaacs so the Feature Request: It would be really great to be able to override the Bash 4.3 compliance of not following globstar symlinks! The option is there and it looks like a simple test for that option here could turn this back on! Is this a possibility? |
@clintwood Yes, in the latest release you can do |
Ahh, great, thank you! |
We have been leveraging glob to follow symlinks to list all files within a given path, and that had worked great until Monday when 4.1.0 came out.
For instance a pattern of '~/myProject/*/' would contain a mixture of folders, files and symlinked folders in the myProjects folder. We see the symlink itself in the list of file paths returned, but none of the child files from the location the symlink is pointing to are shown with the new versions of glob.
It looks like this may be happening on line 370 of glob.js
Was this change to stop following symlinks intended, and if so is there an option planned that will re-enable this feature?
The text was updated successfully, but these errors were encountered: