summaryrefslogtreecommitdiff
path: root/src/rebar_deps.erl
diff options
context:
space:
mode:
authorCliff Moon <cliff@moonpolysoft.com>2010-04-28 19:37:46 -0700
committerCliff Moon <cliff@moonpolysoft.com>2010-04-28 19:37:46 -0700
commit939c36e527344a36450f0e1627907f674d6b448e (patch)
tree9d747f3fca53c1f13bbb7e315abd8d98b03918ef /src/rebar_deps.erl
parentc3fe43a0ba1af0ee9172239be0a44662fa392984 (diff)
parentc28a16258cec1fac8471793b33f4183fa8f07df1 (diff)
merged from basho
Diffstat (limited to 'src/rebar_deps.erl')
-rw-r--r--src/rebar_deps.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 0ccd7ce..ec74e27 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -195,9 +195,9 @@ is_app_available(App, VsnRegex) ->
is_app_available(App, VsnRegex, Path) ->
case rebar_app_utils:is_app_dir(Path) of
{true, AppFile} ->
- case rebar_app_utils:load_app_file(AppFile) of
- {ok, App, AppData} ->
- {vsn, Vsn} = lists:keyfind(vsn, 1, AppData),
+ case rebar_app_utils:app_name(AppFile) of
+ App ->
+ Vsn = rebar_app_utils:app_vsn(AppFile),
?INFO("Looking for ~s-~s ; found ~s-~s at ~s\n",
[App, VsnRegex, App, Vsn, Path]),
case re:run(Vsn, VsnRegex, [{capture, none}]) of
@@ -208,11 +208,9 @@ is_app_available(App, VsnRegex, Path) ->
[AppFile, Vsn, VsnRegex]),
false
end;
- {ok, OtherApp, _} ->
+ OtherApp ->
?WARN("~s has application id ~p; expected ~p\n", [AppFile, OtherApp, App]),
- false;
- {error, Reason} ->
- ?ABORT("Failed to parse ~s: ~p\n", [AppFile, Reason])
+ false
end;
false ->
?WARN("Expected ~s to be an app dir (containing ebin/*.app), but no .app found.\n",