Repository navigation
fix(update): dispatch self-update on detected install method - #103
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #99.
Problem
perform_update()always ran the git-clone install script, no matter how budjirawas installed. For a uv-tool or pipx install that creates a second, parallel
install under
~/.local/share/budjirawhich can shadow the real binary dependingon
PATHorder — while the actually-installed package is never updated.What changed
detect_install_method()derives the install method from the location of therunning package, and
perform_update()dispatches on it:.gitabove the package)install.shfrom master (unchanged).../uv/tools/...uv tool upgrade budjira.../pipx/venvs/...pipx upgrade budjiraThe 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 theuvx install budjira/pipx install budjira/pip install budjiramethodsCLAUDE.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 fromthe git URL), self-update section now describes the actual dispatch table.
README.md: short note on which updater runs for which install.(
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 thatan unrecognized install runs no subprocess at all.
912 passed, 3 skipped. Coverage 86.44% overall, 88% for
version.py.