Vector35 / Vector35/snippets

Symlinking personal directory in snippets directory doesnt allow snippets to be run

Open Beginner friendly
#61 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
31
Forks
14
PR merge metrics
No merged PRs in 30d

Description

If you create a symlink in the snipets directory to some other directory, the editor will show the snippets in the symlinked dir, but you can't execute any of them (no error shown either). Issue is that the includeWalk uses os.walk which by default doesn't follow symlinks, ie.:

https://github.com/Vector35/snippets/blob/ceb917b3f4cb895d186691beff3740d9b17b8eb9/__init__.py#L66

changing that to: os.walk(dir, followlinks=True) will fix this.

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 init.py line 66, where includeWalk uses os.walk, and compare how the editor discovers snippets with how execution traverses the directory. Reproduce the issue with a symlink in the snippets directory, then verify that snippets in the linked directory can be executed without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.