From 8635beffc1c9efc7e26f3cf1597b859a8a72bd3b Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 16 Nov 2014 10:22:46 -0600 Subject: catch error on multiplpe app files in an app dir --- src/rebar_app_discover.erl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/rebar_app_discover.erl') 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) -> -- cgit v1.1