Implemented clone if pull doesn't work

This commit is contained in:
Kevin Veen-Birkenbach
2025-04-18 19:30:21 +02:00
parent 1c0784e41f
commit 6541ca94bd

View File

@@ -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"]