lukeed / lukeed/premove

handling symlinks

Open
#6 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
89
Forks
8
PR merge metrics
No merged PRs in 30d

Description

it seems when there's symlinks involved, they're followed and can result in an infinite loop:

Error: ELOOP: too many symbolic links encountered, stat '/home/runner/work/shadow-dom-utils/shadow-dom-utils/dist/node_modules/shadow-dom-utils/dist/node_modules/shadow-dom-utils/dist/node_modules [...]

tshy creates this kind of structure when building its dual package (node_modules/{package-name} is a symlink to the project dir)

presumably this is because premove follows those symlinks when walking the tree? should we check if the file is a symlink and remove it if so?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at premove's recursive filesystem-walking entry point and reproduce the issue with the symlinked node_modules structure described here. Trace how symlinks are handled during traversal, then verify that the dual-package layout no longer causes an ELOOP error while ordinary recursive removal still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.