summaryrefslogtreecommitdiff
path: root/src/rebar_app_utils.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_app_utils.erl')
-rw-r--r--src/rebar_app_utils.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl
index 4d56ab2..9574775 100644
--- a/src/rebar_app_utils.erl
+++ b/src/rebar_app_utils.erl
@@ -63,7 +63,7 @@ is_app_dir(Dir) ->
is_app_src(Filename) ->
%% If removing the extension .app.src yields a shorter name,
%% this is an .app.src file.
- Filename /= filename:rootname(Filename, ".app.src").
+ Filename =/= filename:rootname(Filename, ".app.src").
app_src_to_app(Filename) ->
filename:join("ebin", filename:basename(Filename, ".app.src") ++ ".app").
@@ -101,14 +101,15 @@ app_vsn(AppFile) ->
%% ===================================================================
load_app_file(Filename) ->
- case erlang:get({app_file, Filename}) of
+ AppFile = {app_file, Filename},
+ case erlang:get(AppFile) of
undefined ->
case file:consult(Filename) of
{ok, [{application, AppName, AppData}]} ->
- erlang:put({app_file, Filename}, {AppName, AppData}),
+ erlang:put(AppFile, {AppName, AppData}),
{ok, AppName, AppData};
- {error, Reason} ->
- {error, Reason};
+ {error, _} = Error ->
+ Error;
Other ->
{error, {unexpected_terms, Other}}
end;