Repository navigation
get.sh: warn about other onctl copies on PATH after installing - #1213
Merged
Merged
Conversation
A stale copy elsewhere on PATH (an old /usr/local/bin install, a `go install` in ~/go/bin) can still be the one that runs after a fresh install: its directory may come first, or the user's shell has already hashed it. The installer runs as a child process so it cannot clear that hash itself; instead it now lists the other copies and tells the user to remove them or run `hash -r`. Claude-Session: https://claude.ai/code/session_01SB788HixFrKbYGCxDRi8fX
cdalar
enabled auto-merge
October 22, 2026 04:27
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1213 +/- ##
=======================================
Coverage 45.22% 45.22%
=======================================
Files 75 75
Lines 8732 8732
=======================================
Hits 3949 3949
Misses 4782 4782
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Why
Running the edge installer printed "Installed ... v0.1.36" but
onctl versionkept reporting v0.1.35. An older copy lived in/usr/local/bin, and the interactive bash had already hashed that path before the install, so the new binary in~/.local/binwas never picked up.Putting
hash -rin the script does nothing:curl | bashruns it as a child process, so it cannot touch the parent shell's hash table.What
After installing,
get.shscansPATHfor any otheronctlthat is not the one just installed (-ef, so symlinked dirs don't false-positive). If it finds any, it prints them and tells the user to remove them or runhash -r.Output on a machine with a stale copy:
Silent when there is nothing to report. Tested under
set -euo pipefailboth ways.🤖 Generated with Claude Code
https://claude.ai/code/session_01SB788HixFrKbYGCxDRi8fX