Skip to content

Instantly share code, notes, and snippets.

@EverlastingBugstopper
Last active February 19, 2025 19:54
Show Gist options
  • Select an option

  • Save EverlastingBugstopper/85cea87968b1745277f4258228353f72 to your computer and use it in GitHub Desktop.

Select an option

Save EverlastingBugstopper/85cea87968b1745277f4258228353f72 to your computer and use it in GitHub Desktop.
asdf update to 0.16.0 (including direnv fixes)

had to do a bunch of stuff to upgrade direnv to 0.16

uninstalled existing asdf install by removing ~/.asdf. installed new asdf with brew (brew install asdf)

had to add this to ~/.zshrc:

# asdf is installed via brew by the way
# asdf data directory 
export ASDF_DATA_DIR="$HOME/.asdf"

# asdf completions
fpath=(${ASDF_DATA_DIR:-$HOME/.asdf}/completions $fpath)

# asdf shims
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"

# load all completions into zsh
autoload -Uz compinit && compinit

had to use this weird fork of asdf-direnv to get it to work:

asdf plugin add direnv https://github.com/richtong/asdf-direnv
asdf install direnv

then added this to my ~/.zshrc:

source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"

had to modify ~/.config/direnv/lib/use_asdf.sh to this:

### Do not edit. This was autogenerated by 'asdf cmd direnv setup' ###
use_asdf() {
  source_env "$(asdf cmd direnv envrc "$@")"
}

re-add other plugins with commands like these:

asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add pnpm https://github.com/jonathanmorley/asdf-pnpm.git
asdf plugin add terraform https://github.com/asdf-community/asdf-hashicorp.git
asdf plugin add jq https://github.com/lsanwick/asdf-jq.git

you can find the official repositories for plugins here: https://github.com/asdf-vm/asdf-plugins/tree/master/plugins

from there I could run asdf install to get dependencies installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment