summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-11-16 12:35:26 -0500
committerFred Hebert <mononcqc@ferd.ca>2014-11-16 12:35:26 -0500
commitdc12e831aa15318b9e9eb50bbc3a7f2fda1205df (patch)
treee7a0121b2246ec90abeb23357cf1764b4b63742c /src/rebar_app_discover.erl
parent1d5703025cbfa3d9a6a943e5e1b7011611399380 (diff)
parent8635beffc1c9efc7e26f3cf1597b859a8a72bd3b (diff)
Merge pull request #6 from tsloughter/app_files_fix
catch error on multiplpe app files in an app dir
Diffstat (limited to 'src/rebar_app_discover.erl')
-rw-r--r--src/rebar_app_discover.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index ae4916e..4005612 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -70,7 +70,9 @@ find_app(AppDir, Validate) ->
[F] ->
rebar_app_info:app_file_src(AppInfo1, F);
[] ->
- AppInfo1
+ AppInfo1;
+ Other when is_list(Other) ->
+ throw({error, {multiple_app_files, Other}})
end,
case Validate of
valid ->
@@ -101,8 +103,12 @@ find_app(AppDir, Validate) ->
false
end;
[] ->
- false
- end
+ false;
+ Other when is_list(Other) ->
+ throw({error, {multiple_app_files, Other}})
+ end;
+ Other when is_list(Other) ->
+ throw({error, {multiple_app_files, Other}})
end.
app_dir(AppFile) ->