Replace asdf source line with mise activate in shell config files

What does this merge request do and why?

This MR automatically swaps asdf source lines with mise activate commands in shell config files. We used to leave this as a manual step since some users prefer to manage their shell configs themselves, but we've noticed this step is often missed. Now we'll handle it automatically.

Closes #2468 (closed)

How to set up and validate locally

  1. Add the following to your .bashrc file:

    cat << 'EOF' >> ~/.bashrc
    
    # Added by GDK bootstrap
    source ~/.asdf/asdf.sh
    EOF
  2. Run bundle exec rake mise:migrate.

    Click to expand
    ✅️ Migration from asdf to mise is almost complete!
    
    => Shell config files updated:
       - /Users/naohashizume/.bashrc
    
    => Backups of your original shell config files were created:
       - /Users/naohashizume/.bashrc.20250226220805.bak
    
    => Next steps:
    => 1. Please restart your terminal.
    => 2. Afterward, run this command:
       gdk reconfigure && gdk update
    
    => If you encounter any issues with mise, see our troubleshooting guide: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/mise.md
  3. Check that .bashrc has the mise activate command instead of sourcing asdf. For example:

    # Added by GDK bootstrap
    eval "$(/opt/homebrew/bin/mise activate bash)"

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This MR references an issue describing the change.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
Edited by Nao Hashizume

Merge request reports

Loading