Skip to content

Prevent mise wrappers recursing when ~/.local/bin precedes mise in PATH (#14831) - #14843

Closed
Sebo1411 wants to merge 1 commit into
omacom:quattrofrom
Sebo1411:fix/issue-14831-mise-wrapper-path-recursion
Closed

Sebo1411 wants to merge 1 commit into
omacom:quattrofrom
Sebo1411:fix/issue-14831-mise-wrapper-path-recursion

Conversation

@Sebo1411

Copy link
Copy Markdown
Contributor

Fixes #14831

Problem

When third-party installers (such as CLI tools, language managers, or agent installers) or user shell dotfiles place ~/.local/bin ahead of mise tool directories in PATH, invoking any generated mise wrapper (e.g. grok, opencode, pi, omp, cursor-agent, gh) hangs indefinitely at 100% CPU. Inside mise x <pkg> -- <bin>, resolving <bin> finds the wrapper in ~/.local/bin again instead of the package binary in mise's tool directories, recursing infinitely.

Solution

  • In bin/omarchy-mise-install, update the generated wrapper template to strip ~/.local/bin entries from PATH before executing mise. This ensures mise x resolves the target binary from mise's tool directories rather than re-executing the wrapper.
  • Added migration migrations/1791626600.sh to regenerate existing wrappers on disk that match the previous template formats.
  • Added tests in test/shell.d/mise-install-test.sh verifying that ~/.local/bin is stripped from PATH when running generated wrappers.
  • Added migration test test/shell.d/mise-wrapper-path-recursion-migration-test.sh verifying that stale wrappers are regenerated with the updated template while preserving arguments and leaving customized scripts untouched.

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was established.

Summary

The PR moves ~/.local/bin to the end of PATH before generated wrappers call mise.

  • Mise wrappers move ~/.local/bin to the end of PATH.

No new actionable findings were accepted. Previous threads supplied no comment numbers, so previousFindings is empty.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Run generated wrapper] --> B{Local bin appears in PATH?}
  B -->|Yes| C[Move local bin to the end]
  B -->|No| D[Keep PATH unchanged]
  C --> E[Ask mise to install the package]
  D --> E
  E --> F[Launch the tool through mise x]
Loading

Reviews (7) · Last reviewed commit: "Prevent mise wrappers recursing when ~/...." · Reviewed by Greptile

Comment thread bin/omarchy-mise-install Resolved
Comment thread bin/omarchy-mise-install Resolved
@Sebo1411
Sebo1411 force-pushed the fix/issue-14831-mise-wrapper-path-recursion branch from bd729be to 329d3a4 Compare October 10, 2026 10:15
Comment thread bin/omarchy-mise-install Resolved
@Sebo1411
Sebo1411 force-pushed the fix/issue-14831-mise-wrapper-path-recursion branch from 329d3a4 to da3d085 Compare October 10, 2026 10:24
Comment thread bin/omarchy-mise-install Resolved
@Sebo1411
Sebo1411 force-pushed the fix/issue-14831-mise-wrapper-path-recursion branch from da3d085 to 71183f9 Compare October 10, 2026 10:51
Comment thread bin/omarchy-mise-install Resolved
@Sebo1411
Sebo1411 force-pushed the fix/issue-14831-mise-wrapper-path-recursion branch from 71183f9 to 0d9073c Compare October 10, 2026 11:01
Comment thread migrations/1791626600.sh Resolved
@Sebo1411
Sebo1411 force-pushed the fix/issue-14831-mise-wrapper-path-recursion branch from 0d9073c to cd185bb Compare October 10, 2026 11:08
@Sebo1411

Copy link
Copy Markdown
Contributor Author

@greptile review

@Sebo1411

Copy link
Copy Markdown
Contributor Author

Closing in favor of #14880, which takes a cleaner and more robust approach.

@Sebo1411 Sebo1411 closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mise wrappers loop forever when ~/.local/bin is ahead of mise tool dirs in PATH

1 participant