Bail out of the mise stub if the install fails

Saves a second, murkier error from the exec that would follow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-27 10:49:01 -07:00
co-authored by Claude Opus 5
parent e55f130d55
commit 1472fc1b38
+2 -2
View File
@@ -16,8 +16,8 @@ mkdir -p "$HOME/.local/bin"
cat >"$HOME/.local/bin/$command" <<EOF
#!/bin/bash
mise use -g "$package"
exec mise exec "$package" -- "$bin" "\$@"
mise use -g "$package" || exit 1
exec mise x "$package" -- "$bin" "\$@"
EOF
chmod +x "$HOME/.local/bin/$command"