Repository navigation
Conversation
|
To use Codex here, create a Codex account and connect to github. |
ee42826 to
0a66d9e
Compare
0a66d9e to
011c837
Compare
Field-tested on a real install — this fix is the right shapeI hit this exact loop ( My local workaround landed on the same principle as this PR: resolve the real binary first, then exec it directly — mise use -g --quiet "$pkg" || exit 1
exec "$(mise which "$pkg")" "$@"Verified on this machine:
So resolving to an absolute path before executing is confirmed working in production. Appreciate the |
Thanks for taking the time to try this fix. but i need to point out one thing, this is no longer using the |
Keep command-name rejection and path-escape coverage in mise-install-test.sh, which already exercises the generator guard and verifies that an escaping name leaves files outside the wrapper directory intact. Remove the overlapping command-name block from mise-wrapper-resolution-test.sh. Retain the bin-name rejection tests, which cover the new package-directory lookup, along with wrapper execution and migration coverage. Validation: mise-install-test.sh and mise-wrapper-resolution-test.sh pass; git diff --check passes.
|
Reviewed by Claude Opus 5.5 and verified on a disposable Omarchy worker (mise 2026.9.11) against Reproduction. I regenerated the Suite. I ran Design. Resolving through Competing fixes. Several open pull requests fix the same loop: #13090, #13677 and #13769 use Nothing is needed from you. This now waits on the maintainer, and on a second-opinion review once one can run. |
Keep the bin-paths stub beside quattro's new mise ls stub for the Grok registry migration; they answer different subcommands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This branch had stopped merging with Reviewed by Claude Opus 5.5 and by Codex Medium as a second opinion, which ran this time. Its independence is not guaranteed. Tests ran on a disposable Omarchy worker (mise 2026.9.11) against Reproduction, at the merge. I regenerated the Suite. The mise tests ( Second opinion. Codex Medium was given this PR and the seven competing fixes without my conclusion, and it picked this one. It found that Nothing is needed from you. This waits on the maintainer, who has the competing fixes to choose between. |
|
|
fyi we should not merge this, #9596 is a better fix that removes the wrappers |
Agreed. Subscribed to it and will close this PR when it merges |
The old fix shadowed omarchy-mise-install in ~/.local/bin, which would silently outlive any upstream change. The guard instead rewrites only exact stock wrappers after each update, backs them up first, and never shadows the packaged generator. A byte-identical legacy override is moved out of PATH; anything unknown is left alone and reported. Once the packaged generator resolves binaries itself (omacom/omarchy#8692), the guard changes nothing and asks to be removed. Wrappers upstream generates are never flagged, and its migration skips guarded ones. The feature is opt-in through ./install.sh --mise-wrapper-resolution.
Fixes #7234.
Problem
When
~/.local/bincomes before mise's binaries inPATH, a generated wrapper can execute itself throughmise xand hang forever.Fix
The fix is resolving the command's absolute binary path and using that instead.
A straightforward (but naive) way to resolve the command would be:
Here,
--tool="$package"tells mise which tool/version to use while resolving"$bin". It does not guarantee that the returned executable comes from that package's own install directory. Another active package can provide the same executable name.Instead, the wrapper now asks for the requested package's runtime directories and searches them directly:
It passes the first matching absolute path to
mise xand reports an error when no match exists.Migration
1787809285.shregenerates wrappers matching the old template. It preserves custom wrappers and symlinks and leaves repaired wrappers alone.Testing
All tests in
./test/allpass: CLI and all 237 shell test files.The new test coverage verifies that:
mise bin-paths "$package"stays within the requested package;mise x;bin-pathsstops before execution;