Merge pull request #6350 from husamemadH/fix-mise-install-wrapper-recursion

Fix infinite loop in omarchy-mise-install wrappers
This commit is contained in:
David Heinemeier Hansson
2026-07-24 09:20:15 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ mkdir -p "$HOME/.local/bin"
cat >"$HOME/.local/bin/$command" <<EOF
#!/bin/bash
mise use -g "$package"
exec "$bin" "\$@"
exec mise exec "$package" -- "$bin" "\$@"
EOF
chmod +x "$HOME/.local/bin/$command"
+12
View File
@@ -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