From bdea87a1bc0d55d5845c3ff14fd91f03dcae8cf3 Mon Sep 17 00:00:00 2001 From: Nose Date: Thu, 22 Jan 2026 03:31:36 -0800 Subject: [PATCH] f --- scripts/bootstrap.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap.py b/scripts/bootstrap.py index c8aa21f..1c92d40 100644 --- a/scripts/bootstrap.py +++ b/scripts/bootstrap.py @@ -865,6 +865,18 @@ def main() -> int: # Non-interactive, fall back to delegating to platform helper return "delegate" + def _clone_repo(url: str, dest: Path, depth: int = 1) -> bool: + """Helper to clone a repository.""" + try: + cmd = ["git", "clone", url, str(dest)] + if depth: + cmd.extend(["--depth", str(depth)]) + subprocess.check_call(cmd) + return True + except Exception as e: + print(f"Error: Failed to clone repository: {e}", file=sys.stderr) + return False + def _ensure_repo_available() -> bool: """Prompt for a clone location when running outside the repository.""" nonlocal repo_root, script_dir, is_in_repo @@ -919,11 +931,9 @@ def main() -> int: else: print(f"Cloning Medios-Macina into {install_path} (depth 1)...") print(f"Source: {REPO_URL}") - try: - subprocess.check_call(["git", "clone", "--depth", "1", REPO_URL, str(install_path)]) + if _clone_repo(REPO_URL, install_path, depth=1): repo_root = install_path - except Exception as e: - print(f"Error: Failed to clone repository: {e}", file=sys.stderr) + else: return False os.chdir(str(repo_root)) @@ -1807,8 +1817,8 @@ if (Test-Path (Join-Path $repo 'CLI.py')) { if not args.quiet: os.system('cls' if os.name == 'nt' else 'clear') print() - print("command: mm") - print(".config") + print("launch command from terminal: mm") + print("inside the app: .config") print() return 0