diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-05-04 19:18:13 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-05-04 19:18:13 -0500 |
commit | aa7a272aaefddeae04b875328971c6e30e4dfade (patch) | |
tree | a2e34ed74af9f0330377aabbca05a1a28069a336 | |
parent | bfd08c129d0e35e51d494309729f19ddb2e76eb7 (diff) |
set resources to empty list if non in app env
-rw-r--r-- | src/rebar_state.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 9bf90d5..7a6e60d 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -117,7 +117,12 @@ new(ParentState, Config, Dir) -> ,default=NewOpts}. base_state() -> - {ok, Resources} = application:get_env(rebar, resources), + case application:get_env(rebar, resources) of + undefined -> + Resources = []; + {ok, Resources} -> + Resources + end, #state_t{resources=Resources}. get(State, Key) -> |