From 4480a1423634c87b93d868329a5b2300b1e9b920 Mon Sep 17 00:00:00 2001 From: husamemadH Date: Thu, 23 Jul 2026 11:26:32 +0300 Subject: [PATCH 1/2] Fix infinite loop in omarchy-mise-install wrappers exec via `mise exec "$package"` so the tool resolves from mise's install dir instead of by name through PATH. Previously `exec "$bin"` could re-find the wrapper itself when ~/.local/bin precedes mise's install path (e.g. when starship/zoxide clobber mise's PROMPT_COMMAND hook, #3685), recursing forever. Scoping to $package keeps lazy install and avoids leaking other runtimes into PATH. --- bin/omarchy-mise-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/omarchy-mise-install b/bin/omarchy-mise-install index bf98dd9f..2140fc72 100755 --- a/bin/omarchy-mise-install +++ b/bin/omarchy-mise-install @@ -17,7 +17,7 @@ mkdir -p "$HOME/.local/bin" cat >"$HOME/.local/bin/$command" < Date: Fri, 24 Jul 2026 09:19:56 -0700 Subject: [PATCH 2/2] Regenerate existing mise wrappers via migration The generator fix only helps fresh installs; existing wrappers in ~/.local/bin keep the recursive exec line until rewritten. Detect the generated wrapper shape, extract package and bin, and reinstall each one, which also repairs wrappers users created for their own packages. Co-Authored-By: Claude Fable 5 --- migrations/1784909971.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 migrations/1784909971.sh diff --git a/migrations/1784909971.sh b/migrations/1784909971.sh new file mode 100644 index 00000000..4f5aafdc --- /dev/null +++ b/migrations/1784909971.sh @@ -0,0 +1,12 @@ +echo "Regenerate mise wrappers to stop them recursing through PATH" + +for wrapper in "$HOME/.local/bin"/*; do + [[ -f $wrapper && -x $wrapper ]] || continue + + package=$(sed -n 's/^mise use -g "\(.*\)"$/\1/p' "$wrapper") + bin=$(sed -n 's/^exec "\(.*\)" "\$@"$/\1/p' "$wrapper") + + if [[ -n $package && -n $bin ]]; then + omarchy-mise-install "$package" "$(basename "$wrapper")" "$bin" + fi +done