Repository navigation
fix(install): keep dev on the PATH and pin on every Mac (26.11.11) - #14
Merged
Merged
Conversation
After an update, ~/.local/bin/dev could point at nothing, so dev was gone from every terminal. Every install now points the link at the copy it installs, in one rename, and the cleanup of old copies keeps the copy the link names and the copy ~/.zshrc sources. Root cause: install_cli compared the link's resolved path, which reached the new copy through a retired copy's bin/dev, so the link kept naming the old copy; pins_in_use also resolved the link to its end, so prune_pins deleted the copy it named three releases later (setup.py install_cli, pins_in_use) Verified: python3 -m unittest tests.test_pinned_install: OK; dev test prove: the 3 new DevLinkTests fail without the change and pass with it
A teammate's fresh dev install stopped with Permission denied before anything was installed. The new copy now moves into place while its folder is writable and is read-only again once it is there. Root cause: _build made the copy read-only before os.rename moved it, and some Macs refuse to rename a folder its owner cannot write even within one parent (setup.py _build) Verified: python3 and /usr/bin/python3 -m unittest tests.test_pinned_install: OK; dev test prove: StrictRenameTests fails without the change with the teammate's PermissionError and passes with it
Version 26.11.11 in VERSION and the three manifests, and its CHANGELOG section: dev stays on the PATH across updates, and a fresh install moves its pinned copy into place on every Mac. Verified: dev docs check CHANGELOG.md: 0 issues, links resolve
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.
What and why
Two install bugs.
dev updatecould leavedevoff the PATH: after an update retired an older copy, the link~/.local/bin/devkept naming that copy, and the cleanup of old copies deleted it three releases later, so the linkpointed at nothing. And a teammate's fresh
dev installstopped with "Permission denied" before anything wasinstalled: the new pinned copy was made read-only before it was renamed into place, and their Mac refuses to rename a
folder its owner cannot write.
Changes
install_clipoints~/.local/bin/devat the copy it installs whenever the link names anything else, swapped inone rename, so no moment exists without
dev.pins_in_usekeeps the copy the link names, not only the copy it ends up at, and the copy~/.zshrcsources,which is what puts
~/.local/binon the PATH._buildrenames the new copy (and a copy it replaces) while its folder is writable, and makes it read-only rightafter.
How to verify
dev ci --runpassed 7 of 7 steps (compile, unit tests, gitleaks, semgrep, osv-scanner, trivy, zizmor)on tree 531ab96.
tests.test_pinned_installon Python 3.15 and the system Python 3.9: OK.dev test prove: the four new tests failwithout the change (the link kept naming the old copy, then pointed at nothing; the teammate's PermissionError) and
pass 5 of 5 runs with it.
2026-11-10 pruned 26.11.5.
Risk and rollback
Low: two functions in the install, each covered by tests that copy the failure. The copy ends read-only as before.
Roll back with
dev install --version 26.11.10.Links
CHANGELOG.md, section 26.11.11