👋 I’m Nathan

TIL about ELIXIR_CLI_DRY_RUN for elixir and iex

While I’ve been working on deploying some elixir releases I’ve been trying to understand how the flags I’m setting end up being seen by erlang. Well, it turns out elixir has an ENV var for this named ELIXIR_CLI_DRY_RUN.

Here is an example:

$ ELIXIR_CLI_DRY_RUN=1 iex
erl -pa /usr/local/Cellar/elixir/1.11.2/bin/../lib/eex/ebin \
		/usr/local/Cellar/elixir/1.11.2/bin/../lib/elixir/ebin \
		/usr/local/Cellar/elixir/1.11.2/bin/../lib/ex_unit/ebin \
		/usr/local/Cellar/elixir/1.11.2/bin/../lib/iex/ebin \
		/usr/local/Cellar/elixir/1.11.2/bin/../lib/logger/ebin \
		/usr/local/Cellar/elixir/1.11.2/bin/../lib/mix/ebin \
	-noshell \
	-user Elixir.IEx.CLI \
	-extra --no-halt +iex

You can see a lot of interesting info here:

I found this super interesting and it helped me learn a lot about how erlang boots up, how modules are loaded, etc.