huge refactor of plugin system

This commit is contained in:
2026-04-30 18:56:22 -07:00
parent ea3ead248b
commit be5a11da97
99 changed files with 7603 additions and 11320 deletions
+9
View File
@@ -1057,6 +1057,7 @@ def main() -> int:
def _ensure_repo_available() -> bool:
"""Prompt for a clone location when running outside the repository."""
nonlocal repo_root, script_dir, is_in_repo
repo_dir_name = "Medios-Macina"
# If we have already settled on a repository path in this session, skip.
if is_in_repo and repo_root is not None:
@@ -1099,6 +1100,14 @@ def main() -> int:
print("Error: Could not determine installation path.", file=sys.stderr)
return False
if install_path.exists() and install_path.is_dir() and not _is_valid_mm_repo(install_path):
try:
has_contents = any(install_path.iterdir())
except Exception:
has_contents = False
if has_contents:
install_path = install_path / repo_dir_name
except (EOFError, KeyboardInterrupt):
return False