MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / _migrate_registry_dir

Function _migrate_registry_dir

registry.py:26–39  ·  view source on GitHub ↗

Migrate ~/.autocoder/ to ~/.autoforge/ if needed. Provides backward compatibility by automatically renaming the old config directory to the new location on first access.

()

Source from the content-addressed store, hash-verified

24
25
26def _migrate_registry_dir() -> None:
27 """Migrate ~/.autocoder/ to ~/.autoforge/ if needed.
28
29 Provides backward compatibility by automatically renaming the old
30 config directory to the new location on first access.
31 """
32 old_dir = Path.home() / ".autocoder"
33 new_dir = Path.home() / ".autoforge"
34 if old_dir.exists() and not new_dir.exists():
35 try:
36 old_dir.rename(new_dir)
37 logger.info("Migrated registry directory: ~/.autocoder/ -> ~/.autoforge/")
38 except Exception:
39 logger.warning("Failed to migrate ~/.autocoder/ to ~/.autoforge/", exc_info=True)
40
41
42# =============================================================================

Callers 1

get_config_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected