Update check at startup with prompt to update #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Users should stay current without thinking about it. When lazyforge starts, it checks for a newer release. If there is one, it asks whether to update before continuing. If the user says yes, it updates and then starts the new version.
Plan
lazyforge v1.3.0 is available (you have v1.2.0). Update now? [Y/n], plus a one-line release summary if available.checksums.txt, atomically replace the running binary (write a temp file next to it, then rename), and re-exec the new version with the same arguments. On any failure, say what failed and start the current version.version == "dev")--no-update-checkis passedLAZYFORGE_NO_UPDATE_CHECK=1is setupdate_check: falsevX available, update with your package manager or install.shinstead.Opus settles the self-replace and re-exec details (macOS code-signing caveats, Windows is out of scope) and records an ADR.
Plan-review additions (#17)
lazyforge.olduntil the new one has started, so a failed re-exec can fall back to it and say so. A failed download, checksum or rename never leaves the install broken.brew --prefixpaths,/opt/homebrew,/usr/local/Cellar), a Nix store (/nix/store), or a system path (/usr/bin,/usr/local/binowned by root), or isn't writable by the current user. In any of those, print the "update with your package manager or install.sh" line instead of updating.Product questions
These are tracked in the product-decisions ticket:
Context
docs/design.md→ "Install and updates".go-development→ I/O rules (explicit HTTP timeouts, nohttp.DefaultClient).PM decisions (2026-10-02, #13)
Update now? [Y/n].🤖 Merged in #29. At startup lazyforge checks for a newer release (it gives up after 2 seconds, so offline is fine) and asks 'Update now? [Y/n]'. Yes verifies the download, swaps the binary and restarts. No carries on, and the next launch asks again. Package-manager or read-only installs just say an update is available.