build: keep the checkout build off PATH - #83
Merged
Conversation
`just build` wrote straight into ~/.local/bin, so compiling put the working tree in front of whatever ob the machine had installed. Typing `ob` then meant the checkout, and `ob doctor` reported it on every run as "PATH selects a different ob executable than the running binary; 1 stale PATH candidate(s) found" — a warning that was correct, permanent, and easy to stop reading. The difference only surfaces when someone is already confused about which binary produced a result, which is the worst moment to discover it. Shipping a binary onto PATH is a decision rather than a side effect of compiling, so the build lands in ./bin — already gitignored, already where the docs generator reads it from — and `just install` is the step that puts it on PATH, saying where it landed and what it answers to. `just clean` removes both. OB_BIN_DIR moves the build, OB_INSTALL_DIR the install. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first version of this change left `clean` removing ~/.local/bin/ob as well as the build. That was right while `build` wrote there — it removed what the recipe had put there — and wrong the moment the build moved to ./bin: `just clean` in a checkout would delete a binary this checkout may never have created, including a release installed by hand through the steps the installation guide gives. `clean` now removes the build. `uninstall` removes the copy on PATH, and says which path it removed. Verified: with a binary installed, `just clean` removes ./bin/ob and leaves ~/.local/bin/ob standing; `just uninstall` then removes it and `ob` falls back to the Homebrew release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
just buildwrote straight into~/.local/bin, so compiling put the working tree in front of whateverobthe machine had installed. Typingobmeant the checkout, andob doctorreported it on every run:A warning that was correct, permanent, and easy to stop reading. The difference only surfaces when someone is already confused about which binary produced a result — the worst moment to discover it.
Change
Shipping a binary onto PATH is a decision, not a side effect of compiling.
just build→./bin/ob(already gitignored, already where the docs generator reads it from)just install→ the deliberate step that copies it to~/.local/bin, printing where it landed and what it answers tojust clean→ removes bothOB_BIN_DIRmoves the build,OB_INSTALL_DIRmoves the installREADME and CONTRIBUTING corrected to match.
Verified locally
🤖 Generated with Claude Code