fix(skills): replace symlink install destinations - #21739
Closed
Bartok9 wants to merge 1 commit into
Closed
Conversation
Closes NousResearch#21735 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
CI status note:
This PR does not introduce a lint failure. |
Contributor
Author
|
The test CI failure is pre-existing on |
Contributor
Author
|
The test CI failure is pre-existing on |
19 tasks
Contributor
Author
|
CI note: The failing checks ( |
Contributor
Author
|
Closing to stay under the repo's 10-PR contributor limit. Will resubmit with updated code if the issue is still open in main. |
This was referenced Jul 30, 2026
Bug: skill install crashes with ValueError when SKILLS_DIR or install path contains a symlink
#53403
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
hermes skills install --forcecrashes when the existing install destination is a symbolic link because the installer tries to pass that path toshutil.rmtree(), which refuses to operate on symlinks.Closes #21735
Root cause
install_from_quarantine()only checkedinstall_dir.exists()before cleanup, then always calledshutil.rmtree(install_dir). For directory symlinks, that raisesOSErrorinstead of replacing the previous install path.Fix
Add a small cleanup helper that unlinks symlinks and files, while preserving the existing recursive removal behavior for real directories. The regression test installs over a symlinked skill path and verifies the symlink target is left intact.
Testing
uv run --with ruff --with pytest --with pytest-xdist --python 3.11 ruff check tools/skills_hub.py tests/tools/test_skills_hub.py: cleanuv run --with pytest --with pytest-xdist --python 3.11 pytest tests/tools/test_skills_hub.py -q: 107 passedMade with Cursor