omegon 0.6.32 → 0.6.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -634,6 +634,21 @@ async function updateDevMode(
634
634
  const steps: string[] = [];
635
635
 
636
636
  // ── Step 1: git pull omegon ──────────────────────────────────────
637
+ // If HEAD is detached (e.g. after a failed prior update or branch checkout),
638
+ // reattach to main before pulling — otherwise git pull silently fails and the
639
+ // rest of the pipeline builds stale code, producing a broken restart.
640
+ const headRef = await run("git", ["symbolic-ref", "--quiet", "HEAD"], { cwd: omegonRoot });
641
+ if (headRef.code !== 0) {
642
+ ctx.ui.notify("▸ Detached HEAD detected — checking out main…", "warning");
643
+ const checkout = await run("git", ["checkout", "main"], { cwd: omegonRoot });
644
+ if (checkout.code !== 0) {
645
+ steps.push(`✗ could not checkout main: ${checkout.stderr.trim().split("\n")[0]}`);
646
+ ctx.ui.notify(`Update aborted (detached HEAD, checkout failed):\n${steps.join("\n")}`, "error");
647
+ return;
648
+ }
649
+ steps.push("✓ reattached to main");
650
+ }
651
+
637
652
  ctx.ui.notify("▸ Pulling omegon…", "info");
638
653
  const pull = await run("git", ["pull", "--ff-only"], { cwd: omegonRoot });
639
654
  if (pull.code !== 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omegon",
3
- "version": "0.6.32",
3
+ "version": "0.6.33",
4
4
  "description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
5
5
  "bin": {
6
6
  "omegon": "bin/omegon.mjs",