installer: small follow-ups (orphaned *.new, XDG path in uninstall, HTTP health probe, test noise) #535

Closed
opened 2026-08-20 02:55:50 +02:00 by dries · 0 comments
Owner

Minor findings from the review of PR #524 (feat: add one-line installer and service manager), bundled since they all live in install.sh / scripts/install_test.sh:

  • Orphaned staging files: the atomic-update fix (commit 5cf5d99e) builds to $BIN.new / copies to $CTL.new before mv. If a build dies mid-update, cmd_uninstall's rm line doesn't remove the leftover *.new files. Add them to the rm.
  • XDG in uninstall message: cmd_uninstall hardcodes ~/.local/share/ocman in its "data kept at" message even when XDG_DATA_HOME is set. Print the resolved path.
  • start() health check: currently "pid still alive after 1s". An HTTP probe against the configured addr (mirroring how EnsureProjectOpencode probes GET /config) would catch bind failures and crash-after-1s starts. Optional; scope was deliberately minimal.
  • Test noise: scripts/install_test.sh:36 prints Terminated: 15 job-control noise from the sleep 30 helper; silence with wait ... 2>/dev/null || true.
Minor findings from the review of PR #524 (feat: add one-line installer and service manager), bundled since they all live in `install.sh` / `scripts/install_test.sh`: - [ ] **Orphaned staging files**: the atomic-update fix (commit 5cf5d99e) builds to `$BIN.new` / copies to `$CTL.new` before `mv`. If a build dies mid-update, `cmd_uninstall`'s `rm` line doesn't remove the leftover `*.new` files. Add them to the rm. - [ ] **XDG in uninstall message**: `cmd_uninstall` hardcodes `~/.local/share/ocman` in its "data kept at" message even when `XDG_DATA_HOME` is set. Print the resolved path. - [ ] **start() health check**: currently "pid still alive after 1s". An HTTP probe against the configured addr (mirroring how EnsureProjectOpencode probes `GET /config`) would catch bind failures and crash-after-1s starts. Optional; scope was deliberately minimal. - [ ] **Test noise**: `scripts/install_test.sh:36` prints `Terminated: 15` job-control noise from the `sleep 30` helper; silence with `wait ... 2>/dev/null || true`.
dries closed this issue 2026-09-13 22:02:41 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#535
No description provided.