From 6541ca94bd8f6637d8bb8b768cbc096776fcdeab Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 18 Apr 2025 19:30:21 +0200 Subject: [PATCH] Implemented clone if pull doesn't work --- pkgmgr/install_repos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgmgr/install_repos.py b/pkgmgr/install_repos.py index d05f427..a1f65f9 100644 --- a/pkgmgr/install_repos.py +++ b/pkgmgr/install_repos.py @@ -72,9 +72,12 @@ def install_repos(selected_repos, repositories_base_dir, bin_dir, all_repos, no_ try: run_command(cmd_pull, preview=preview) except SystemExit as e: - print(f"Warning: 'pkgmgr pull' command failed (exit code {e}). Ignoring error and continuing.") + print(f"Warning: 'pkgmgr pull' command failed (exit code {e}). Trying fallback clone...") + cmd_clone = "pkgmgr clone " + " ".join(pkgmgr_packages) + run_command(cmd_clone, preview=preview) cmd = "pkgmgr install " + " ".join(pkgmgr_packages) run_command(cmd, preview=preview) + # Install pip packages if defined. if "pip" in requirements: pip_packages = requirements["pip"]