diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-08-17 21:10:43 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-08-17 21:10:43 -0500 |
commit | 629792f36baaaddaeb8ce654760ca4392a571cc5 (patch) | |
tree | b8332107bf24ee9612123ab7c03939da58085290 /src/rebar_app_utils.erl | |
parent | 54e1231e4f34e3bcb9ccdbbd07565fe2538c5401 (diff) |
start of moving to splitting state from config parsing
Diffstat (limited to 'src/rebar_app_utils.erl')
-rw-r--r-- | src/rebar_app_utils.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index bbcbaf4..8544329 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -137,23 +137,23 @@ is_skipped_app(Config, AppFile) -> %% Internal functions %% =================================================================== -load_app_file(Config, Filename) -> +load_app_file(State, Filename) -> AppFile = {app_file, Filename}, - case rebar_config:get_xconf(Config, {appfile, AppFile}, undefined) of + case rebar_state:get(State, {appfile, AppFile}, undefined) of undefined -> case consult_app_file(Filename) of {ok, [{application, AppName, AppData}]} -> - Config1 = rebar_config:set_xconf(Config, - {appfile, AppFile}, - {AppName, AppData}), - {ok, Config1, AppName, AppData}; + State1 = rebar_state:set(State, + {appfile, AppFile}, + {AppName, AppData}), + {ok, State1, AppName, AppData}; {error, _} = Error -> Error; Other -> {error, {unexpected_terms, Other}} end; {AppName, AppData} -> - {ok, Config, AppName, AppData} + {ok, State, AppName, AppData} end. %% In the case of *.app.src we want to give the user the ability to @@ -166,7 +166,7 @@ consult_app_file(Filename) -> false -> file:consult(Filename); true -> - rebar_config:consult_file(Filename) + {ok, rebar_config:consult_file(Filename)} end. get_value(Key, AppInfo, AppFile) -> |