Bug
Running hermes profile create <name> --clone-all fails with a RecursionError
in shutil.copytree when the profile directory contains a symlink that points
to a parent directory.
Traceback
shutil.py _copytree → copytree → _copytree (infinite recursion)
RecursionError: maximum recursion depth exceeded
Root cause
shutil.copytree is called without symlinks=True, so it follows symlinks
rather than copying them as symlinks. If any symlink in ~/.hermes points to
a parent directory, this causes infinite recursion.
Fix
Pass symlinks=True to the shutil.copytree call in the profile clone code.
Workaround
Use export/import instead:
hermes profile export default ./backup.tar.gz
hermes profile import ./backup.tar.gz newprofilename
Bug
Running
hermes profile create <name> --clone-allfails with aRecursionErrorin
shutil.copytreewhen the profile directory contains a symlink that pointsto a parent directory.
Traceback
shutil.py _copytree → copytree → _copytree (infinite recursion)
RecursionError: maximum recursion depth exceeded
Root cause
shutil.copytreeis called withoutsymlinks=True, so it follows symlinksrather than copying them as symlinks. If any symlink in ~/.hermes points to
a parent directory, this causes infinite recursion.
Fix
Pass
symlinks=Trueto theshutil.copytreecall in the profile clone code.Workaround
Use export/import instead:
hermes profile export default ./backup.tar.gz
hermes profile import ./backup.tar.gz newprofilename