-
Notifications
You must be signed in to change notification settings - Fork 540
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
Resolve vendor directory symlinks #535
Resolve vendor directory symlinks #535
Conversation
Thanks for the PR. Before merging I'd like to understand what's going on here and why. Also, I want to make sure it works across nix/windows. |
Sure! I made https://github.com/Fugiman/vendortest to try and make this easier to reproduce. I ran This repo demonstrates the current behavior of " As for why appending I could make this behavior more explicit by manually resolving the symlink before passing it into |
@Fugiman could you detect a symlink and resolve the location? The tailing |
@mattfarina As requested, I now explicitly detect and resolve symlinks. I made the change to I added another test to Please let me know if you'd prefer to have the change in the Strip functions rather than Vendor and I'll move it. I also set it up to resolve nested symlinks, but I don't know if that is overkill or not. |
Resolve vendor directory symlinks
@Fugiman thanks for the contribution! |
If
vendor
is a symlink to another directory (for example,__vendor
),filepath.Walk
will not descend into it, preventing--strip-vcs
and--strip-vendor
from working. Appendingos.PathSeperator
is enough to resolve the symlink.I'm not sure if this is the ideal solution, but I copied the pattern from
glide-vc
which works as expected on symlink'd vendor directories.