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:
co-authored by
Claude Opus 5
parent
e55f130d55
commit
1472fc1b38
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user