mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
fix(profiles): preserve symlinks in clone-all and skills clone paths
Widens the symlinks=True fix to the create_profile clone sites so a symlink pointing at a parent directory can't recurse infinitely during 'hermes profile create <name> --clone-all' (#11560). Export paths were covered by the salvaged #58397/#58445 commits; this carries the clone half of open PR #11573. Fixes #11560
This commit is contained in:
parent
8d9684c9da
commit
b7192b1cb0
1 changed files with 2 additions and 1 deletions
|
|
@ -1061,6 +1061,7 @@ def create_profile(
|
|||
shutil.copytree(
|
||||
source_dir,
|
||||
profile_dir,
|
||||
symlinks=True,
|
||||
ignore=_clone_all_copytree_ignore(source_dir),
|
||||
)
|
||||
# Strip runtime files
|
||||
|
|
@ -1095,7 +1096,7 @@ def create_profile(
|
|||
# same agent capabilities as the source profile.
|
||||
source_skills = source_dir / "skills"
|
||||
if source_skills.is_dir():
|
||||
shutil.copytree(source_skills, profile_dir / "skills", dirs_exist_ok=True)
|
||||
shutil.copytree(source_skills, profile_dir / "skills", symlinks=True, dirs_exist_ok=True)
|
||||
|
||||
# Clone memory and other subdirectory files
|
||||
for relpath in _CLONE_SUBDIR_FILES:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue