Setting Elixir from bin/ folder in git repo with asdf

I have switched from exenv to asdf,

let’s say my elixir-core repo is in ~/git/elixir,
How can I tell asdf that when I’m insde ~/git/elixir and I execute and of the bin/ commands (elixir, elixirc, mix, iex), it will run it from ~/git/elixir/bin and not from the global installation

Here is documentation for it.

This is what a .tool-versions file looks like:

ruby 2.5.3
nodejs 10.15.0

The versions can be in the following format:

  • (…)
  • path:/src/elixir - a path to custom compiled version of a tool to use. For use by language developers and such.
  • system - this keyword causes asdf to passthrough to the version of the tool on the system that is not managed by asdf.
1 Like

Thank you @eiji
the solution is to add

elixir path:/home/USERNAME/git/elixir/ to .tool-versions
the only caveat is I haven’t been able to figure out how to set a relative path. ~ not $(HOME) can be used either

1 Like