Files
hermes-agent/hermes_cli
kshitijk4poor cfc11f217a fix(distribution): refuse to replace a symlinked owned container
A user who points `profiles/x/skills` at a shared directory did so on
purpose. The merge path replaced such a symlink with a real directory
silently, discarding that configuration, where the base rmtree at least
failed loudly. Raise DistributionError naming the link instead; the
file->directory replacement stays because a stray file there is never
deliberate configuration.

`_remove_existing` now removes anything that lexists but is not a real
directory via unlink, so fifos and sockets no longer slip through.

Reviewer P1 on the original PR (symlink container must survive intact).
2026-09-15 06:22:15 -07:00
..