Skip to content

fix(update): dispatch self-update on detected install method - #103

Merged
f3rdy merged 1 commit into
masterfrom
fix/issue-99-update-install-method
Jul 29, 2026
Merged

f3rdy merged 1 commit into
masterfrom
fix/issue-99-update-install-method

Conversation

@f3rdy

@f3rdy f3rdy commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #99.

Problem

perform_update() always ran the git-clone install script, no matter how budjira
was installed. For a uv-tool or pipx install that creates a second, parallel
install under ~/.local/share/budjira which can shadow the real binary depending
on PATH order — while the actually-installed package is never updated.

What changed

detect_install_method() derives the install method from the location of the
running package, and perform_update() dispatches on it:

Detected layout Update action
git checkout (a .git above the package) install.sh from master (unchanged)
.../uv/tools/... uv tool upgrade budjira
.../pipx/venvs/... pipx upgrade budjira
anything else refuses, points at a manual update

The refusal is the point: guessing here is what produced the shadow install.

Docs

The issue proposed either dispatching or correcting the docs. Both were needed —
budjira is not on PyPI (https://pypi.org/pypi/budjira/json → 404), so the
uvx install budjira / pipx install budjira / pip install budjira methods
CLAUDE.md advertised could never have worked. CLAUDE.md also claimed the version
check queries the PyPI JSON API; the code queries the GitHub Releases API.

  • CLAUDE.md: install methods corrected (install script, or uv tool / pipx from
    the git URL), self-update section now describes the actual dispatch table.
  • README.md: short note on which updater runs for which install.
  • AI usage prompt regenerated — it also picked up pre-existing drift
    (worklog delete, worklog IDs) that had never been regenerated.

Tests

8 new tests: 4 for detection (git clone / uv tool / pipx / unrecognized, each
against a real directory layout in tmp_path), 4 for dispatch — including that
an unrecognized install runs no subprocess at all.

912 passed, 3 skipped. Coverage 86.44% overall, 88% for version.py.

perform_update() always ran the git-clone install script, regardless of how
budjira was installed. For a uv-tool or pipx install that created a second,
parallel install under ~/.local/share/budjira which can shadow the real
binary depending on PATH order, while the actual installation stayed stale.

Detect the install method from the location of the running package and
dispatch: install script for a git checkout, `uv tool upgrade` for uv tool,
`pipx upgrade` for pipx. An unrecognized layout now refuses and points at a
manual update instead of guessing.

Also correct the docs, which claimed uvx/pipx/pip installs from PyPI (budjira
is not published to PyPI) and a PyPI-based version check (the code queries the
GitHub Releases API).

Closes #99
@f3rdy
f3rdy merged commit ab3f7ca into master Jul 29, 2026
5 checks passed
@f3rdy
f3rdy deleted the fix/issue-99-update-install-method branch July 29, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update: perform_update ignores installation method (uvx/pipx/pip), contradicting docs

1 participant