summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-02-02 18:20:23 -0600
committerTristan Sloughter <t@crashfast.com>2015-02-02 18:20:23 -0600
commit1e71b4781774d9f12e240a2af6ddb8f166b8eee3 (patch)
treebf78af3b1354f0e2d4ae64c7c18e8156a058e901 /src
parent14037aa45f57fabf01ed94bc8296051987ad1b7f (diff)
fix find_apps when searching for invalid apps
Diffstat (limited to 'src')
-rw-r--r--src/rebar_app_discover.erl10
-rw-r--r--src/rebar_app_info.erl8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index 4d89c0d..21dbe1b 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -88,15 +88,15 @@ find_app(AppDir, Validate) ->
case validate_application_info(AppInfo2) of
true ->
{true, AppInfo2};
- false ->
+ _ ->
false
end;
invalid ->
case validate_application_info(AppInfo2) of
- false ->
- {true, AppInfo2};
true ->
- false
+ false;
+ _ ->
+ {true, AppInfo2}
end;
all ->
{true, AppInfo2}
@@ -177,7 +177,7 @@ has_all_beams(EbinDir, [Module | ModuleList]) ->
true ->
has_all_beams(EbinDir, ModuleList);
false ->
- throw(?PRV_ERROR({missing_module, Module}))
+ ?PRV_ERROR({missing_module, Module})
end;
has_all_beams(_, []) ->
true.
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl
index 23d118f..dca5aa8 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -224,10 +224,10 @@ state(#app_info_t{state=State}) ->
-spec valid(t()) -> boolean().
valid(AppInfo=#app_info_t{valid=undefined}) ->
- try
- rebar_app_discover:validate_application_info(AppInfo)
- catch
- _:_ ->
+ case rebar_app_discover:validate_application_info(AppInfo) of
+ true ->
+ true;
+ _ ->
false
end;
valid(#app_info_t{valid=Valid}) ->