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

Skips symlinks when walking files in a dir #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcarney
Copy link

@dcarney dcarney commented Dec 20, 2018

When walking a path (say, a large vendor/ directory in a Go repo), it's common to encounter symlinks. Attempting to stat/read these symlinks leads to spurious errors like the following:

2018/12/19 18:15:19 Unable to stat "vendor/github.com/grpc-ecosystem/go-grpc-middleware/auth/README.md": stat vendor/github.com/grpc-ecosystem/go-grpc-middleware/auth/README.md: no such file or directory
2018/12/19 18:15:19 Unable to stat "vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/README.md": stat vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/README.md: no such file or directory

This PR adds a simple check to see if a file is a symlink before writing it to the channel of files to check.

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

Successfully merging this pull request may close these issues.

1 participant