fix(install): update installs a checkout without upstream as it is; the startup report no longer asks for a Claude token

This commit is contained in:
2026-10-23 23:40:20 +01:00
parent 3d0c034394
commit afba02899d
3 changed files with 9 additions and 6 deletions
+8 -3
View File
@@ -338,9 +338,14 @@ def update(config):
if active:
raise RuntimeError(f"{len(active)} run(s) are still executing; update after they finish")
if (source / ".git").exists():
pulled = subprocess.run(["git", "-C", str(source), "pull", "--ff-only"], text=True)
if pulled.returncode:
raise RuntimeError("git pull --ff-only failed; resolve the checkout, then rerun `pipelines update`")
upstream = subprocess.run(["git", "-C", str(source), "rev-parse", "--abbrev-ref", "@{u}"],
capture_output=True, text=True)
if upstream.returncode:
print("The checkout tracks no upstream branch; installing it as it is.")
else:
pulled = subprocess.run(["git", "-C", str(source), "pull", "--ff-only"], text=True)
if pulled.returncode:
raise RuntimeError("git pull --ff-only failed; resolve the checkout, then rerun `pipelines update`")
installed = subprocess.run(["sh", str(source / "install.sh"), *config.get("install_args", [])])
if installed.returncode:
raise RuntimeError("The installer failed; the previous version keeps running")