Just set up Elixir using asdf in a fresh ubuntu 24.04 installation and I have the weirdest behavior when reading env vars (OTP 27 - Elixir 17)
If I do:
TEST="test" iex
System.get_env("TEST")
"test"
All works as expected, however, if the environment variable has a “=” character
TEST="test=" iex
System.get_env("TEST")
nil
It just won’t find the variable. if I use my previous computer or any other run time in this computer (Python, node etc) everything works just fine. Any help or has anyone seen anything similar? How could I even start to debug something like this? It happens also in the underlying level of the erlang call for reading env vars.
echoing $TEST works just fine. Same if I try to read the variable in other environments (Python and Node executed fine) so I think something is weird in my shell + erlang connection, however, I have the same issue on elixir/erlang using both bash or zsh
which version of asdf you’re using? i’ve just had this issue and it was a problem with asdf 0.16(the standalone go binary). going back to asdf 0.15(installing with the shell command) had it fixed.
…or you guys can use mise because it’s faster and has more features and does not rely on shims and only manipulates PATH which is demonstrably reducing startup time of the tools it manages.
Don’t forget to deactivate asdf so they don’t fight. No need to uninstall it for now. I had asdf installed for a month or so (but still deactivated) until I was satisfied with mise.