diff options
author | Carl-Johan Kjellander <cjk@campanja.com> | 2018-02-26 16:06:51 +0100 |
---|---|---|
committer | Carl-Johan Kjellander <cjk@campanja.com> | 2018-02-26 16:06:51 +0100 |
commit | 57768ba22ed39d2b099ac09c834ed90f422f2336 (patch) | |
tree | 827b94e7c6691e2a830726472a700a9f81b33654 /src | |
parent | 6d29233a16ae94cf4618ddadb381f91e4e5eb882 (diff) |
make it easier to create env
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_env.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_env.erl b/src/rebar_env.erl index 10bc5b8..eea47de 100644 --- a/src/rebar_env.erl +++ b/src/rebar_env.erl @@ -1,6 +1,7 @@ -module(rebar_env). --export([create_env/2]). +-export([create_env/1, + create_env/2]). -include("rebar.hrl"). @@ -27,6 +28,12 @@ %% ERL = ERLANG_ROOT_DIR/bin/erl %% ERLC = ERLANG_ROOT_DIR/bin/erl %% + +-spec create_env(rebar_state:t()) -> proplists:proplist(). +create_env(State) -> + Opts = rebar_state:opts(State), + create_env(State, Opts). + -spec create_env(rebar_state:t(), rebar_dict()) -> proplists:proplist(). create_env(State, Opts) -> BaseDir = rebar_dir:base_dir(State), |