From aa7a272aaefddeae04b875328971c6e30e4dfade Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 4 May 2015 19:18:13 -0500 Subject: set resources to empty list if non in app env --- src/rebar_state.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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) -> -- cgit v1.1