/
AlexandrNarbaev
/
opencode_initializer
Обзор
Документация
Войти
/
AlexandrNarbaev
/
opencode_initializer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
src/lib/29-mise.sh
45 строк
2 KB
Alexandr Narbaev
v3.0.0: M1-M4 complete (audit+research+synthesis+planning), W1-A air-gap fixes
08 авг 2026, 14:35
08 авг 2026, 14:35
be6ba07
Код
Авторство
О чём код?
#!/usr/bin/env bash # src/lib/29-mise.sh — mise-en-place: universal tool version manager # Installs mise and configures it as optional alternative to per-language managers set -euo pipefail section "mise — Universal Tool Manager" # Install mise if not present if ! command -v mise &>/dev/null; then _progress "mise" "Installing mise..." _spin_start "Downloading mise" # Download → verify (no upstream SHA256, warn) → execute (defense-in-depth vs curl|sh) if _download_verify "https://mise.run" /tmp/mise-install.sh && bash /tmp/mise-install.sh 2>/dev/null; then _spin_stop "✓" rm -f /tmp/mise-install.sh else _spin_stop "✗" rm -f /tmp/mise-install.sh warn "mise install failed — skipping" return 0 fi # Ensure mise is in PATH export PATH="$HOME/.local/bin:$PATH" fi # Activate mise for the current shell (not adding to .zshrc — user choice) if [ -f "$HOME/.local/bin/mise" ]; then eval "$($HOME/.local/bin/mise activate bash)" 2>/dev/null || true log "mise $(mise --version 2>/dev/null | head -1) installed" fi # Install key tools via mise for version pinning (optional, alongside existing managers) # These complement the existing installations, not replace them if command -v mise &>/dev/null; then _spin_start "Installing common tools via mise" mise install -y node@lts python@latest go@latest 2>/dev/null || true _spin_stop "✓" log "mise tool versions cached" # Set global defaults (compatible with per-project overrides) mise use -g node@lts 2>/dev/null || true fi _step_done step_mise log "mise configured — use 'mise bootstrap' for declarative env setup"