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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
4480a14236
commit
5c1b31ada9
@@ -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
|
||||||
Reference in New Issue
Block a user