Closed joshhunt closed 5 months ago
@joshhunt could we just check if the error is ELoop and bail?
@phated Could do. However, I think that's problematic because:
fixtures/folderA/file-a.txt
, fixtures/folderA/dest/folderA/file-a.txt
, fixtures/folderA/dest/folderA/dest/folderA/file-a.txt
, etcIt's up to you which you would prefer, but I'm skeptical of just waiting for ELOOP.
I think the logic in this PR is good, but I'm struggling to come up with additional test cases to better validate it...
@phated I think this is in a good spot - open for feedback, other approaches, or scenarios to test!
Fixes the
Error: ELOOP: too many symbolic links encountered
exception that happens during the walkdir when the working directory contains circular symlinks.I think this is the right logic to check this, and added some tests to try and catch the common scenarios.