From afba02899d7aff915f7d964a4a709e75ac3da4a6 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Fri, 23 Oct 2026 23:40:20 +0100 Subject: [PATCH] fix(install): update installs a checkout without upstream as it is; the startup report no longer asks for a Claude token --- cmd/pipelines-server/banner.go | 2 -- scripts/manage.py | 11 ++++++++--- scripts/test_manage_native.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/pipelines-server/banner.go b/cmd/pipelines-server/banner.go index 288e0903..f32da007 100644 --- a/cmd/pipelines-server/banner.go +++ b/cmd/pipelines-server/banner.go @@ -77,8 +77,6 @@ func banner(w io.Writer, s startup) { } if s.ClaudeToken { row("Claude", "service token present") - } else { - row("Claude", "no service token; as a background service run `claude setup-token` and save it to ~/.config/pipelines/claude-token (chmod 600)") } if s.HarnessErr != nil { row("Harnesses", "unreadable: "+s.HarnessErr.Error()) diff --git a/scripts/manage.py b/scripts/manage.py index 66e0e63a..b3d56e61 100644 --- a/scripts/manage.py +++ b/scripts/manage.py @@ -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") diff --git a/scripts/test_manage_native.py b/scripts/test_manage_native.py index 20b07c7f..f2e262ff 100644 --- a/scripts/test_manage_native.py +++ b/scripts/test_manage_native.py @@ -194,7 +194,7 @@ class ManageNativeTests(unittest.TestCase): patch.object(manage, "stop") as stop, patch.object(manage, "start") as start, \ patch.object(manage, "report") as report: manage.update(config) - self.assertEqual(calls, [["sh", str(source / "install.sh"), "--port", "18180"]]) + self.assertEqual(calls[-1], ["sh", str(source / "install.sh"), "--port", "18180"]) stop.assert_called_once() start.assert_called_once() report.assert_called_once()