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:
+8
-3
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user