Last Updated: February 25, 2016
·
514
· akalyaev

Pass config to rebar command

If you store applications settings inside configuration files (e.g. config/development.config), you might encounter a problem when you need to pass config to one or a few rebar commands. Here is how you can do that:

ERL_FLAGS='-config custom.config' rebar shell

Passing config to EUnit:

ERL_FLAGS='-config config/test.config' rebar eunit

In Makefile:

test: compile
test:
    ERL_FLAGS='-config config/test.config' rebar eunit skip_deps=true