Skip to content

fix(cli): exclude profiles/ from profile create --clone-all#13129

Closed
hejuntt1014 wants to merge 1 commit into
NousResearch:mainfrom
hejuntt1014:fix/cli-profile-clone-all-exclude-profiles
Closed

fix(cli): exclude profiles/ from profile create --clone-all#13129
hejuntt1014 wants to merge 1 commit into
NousResearch:mainfrom
hejuntt1014:fix/cli-profile-clone-all-exclude-profiles

Conversation

@hejuntt1014

@hejuntt1014 hejuntt1014 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

What / Why

hermes profile create <name> --clone-all used shutil.copytree from the active Hermes home. When that home is the default ~/.hermes, the tree includes profiles/ (sibling named profiles). That directory was copied into the new profile, producing nested .../profiles/.../profiles/... paths and very large disk usage.

Export already excludes profiles via _DEFAULT_EXPORT_EXCLUDE_ROOT; --clone-all should match that behavior.

How to test

  1. pytest tests/hermes_cli/test_profiles.py::TestCreateProfile -v (new test: test_clone_all_excludes_sibling_profiles_tree).
  2. Manually: create ~/.hermes/profiles/other/ with a marker file, run hermes profile create backup --clone-all, confirm ~/.hermes/profiles/backup/profiles does not exist.

Platform

  • Test run: Linux (pytest).

shutil.copytree from default ~/.hermes duplicated ~/.hermes/profiles into
the new profile, causing nested profiles/.../profiles/... and huge disk use.
Match export behavior (_DEFAULT_EXPORT_EXCLUDE_ROOT) by ignoring the sibling
profiles tree at the source root.

Made-with: Cursor
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 22, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #17633 — your commit was cherry-picked onto current main with authorship preserved (rebase-merge). Thanks for the fix! #17633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants