huge refactor of plugin system
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user