Skip to content

Commit 866d975

Browse files
committed
Refactor mise activation logic and remove deprecated script
1 parent 7cc2bd7 commit 866d975

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.claude/hooks/SessionStart/hook.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,23 @@ if [ "$IS_WEB_SESSION" = "true" ]; then
4444

4545
if curl -fsSL "$MISE_URL" -o "$HOME/.local/bin/mise" 2>/dev/null; then
4646
chmod +x "$HOME/.local/bin/mise"
47-
export PATH="$HOME/.local/bin:$PATH"
48-
eval "$(mise activate bash)"
49-
echo 'eval "$(mise activate bash)"' >> "$CLAUDE_ENV_FILE"
47+
SETUP="$(cat << EOF
48+
export PATH="$HOME/.local/bin:$PATH"
49+
export MISE_VERBOSE=1
50+
eval "$(mise activate bash)"
51+
52+
EOF
53+
)"
54+
echo "$SETUP" >> "$CLAUDE_ENV_FILE"
55+
eval "$SETUP"
5056
echo "✅ mise installed successfully"
5157
else
5258
echo "⚠️ mise installation failed (network restricted)"
5359
echo " Tools from .mise.toml will not be available"
5460
fi
5561
else
5662
# mise already available, activate it
63+
# TODO cleanup with 01-mise-activate.sh
5764
mise self-update
5865
eval "$(mise activate bash)"
5966
echo 'eval "$(mise activate bash)"' >> "$CLAUDE_ENV_FILE"

0 commit comments

Comments
 (0)