summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-08-08 14:17:03 -0500
committerTristan Sloughter <t@crashfast.com>2015-08-08 14:17:03 -0500
commit6fde1748b9c7a67db1dbd1fb051d630c79656b3a (patch)
tree405637c328abc04aa3dce2e9bebe4d2a7b5e1c2e /src/rebar_app_discover.erl
parent1001eefc2b0f0979c1a07fc309625ee04df60910 (diff)
fix dialyzer warnings, except 'no local return' warnings
Diffstat (limited to 'src/rebar_app_discover.erl')
-rw-r--r--src/rebar_app_discover.erl15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index c5a79a6..3b34539 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -138,7 +138,7 @@ find_app(AppDir, Validate) ->
app_dir(AppFile) ->
filename:join(rebar_utils:droplast(filename:split(filename:dirname(AppFile)))).
--spec create_app_info(file:name(), file:name()) -> rebar_app_info:t() | {error, term()}.
+-spec create_app_info(file:name(), file:name()) -> rebar_app_info:t().
create_app_info(AppDir, AppFile) ->
[{application, AppName, AppDetails}] = rebar_config:consult_app_file(AppFile),
AppVsn = proplists:get_value(vsn, AppDetails),
@@ -208,16 +208,11 @@ try_handle_app_src_file(_, _AppDir, _AppSrcFile, valid) ->
try_handle_app_src_file(_, AppDir, [File], Validate) when Validate =:= invalid
; Validate =:= all ->
AppInfo = create_app_info(AppDir, File),
- case AppInfo of
- {error, Reason} ->
- throw({error, {invalid_app_file, File, Reason}});
+ case filename:extension(File) of
+ ".script" ->
+ {true, rebar_app_info:app_file_src_script(AppInfo, File)};
_ ->
- case filename:extension(File) of
- ".script" ->
- {true, rebar_app_info:app_file_src_script(AppInfo, File)};
- _ ->
- {true, rebar_app_info:app_file_src(AppInfo, File)}
- end
+ {true, rebar_app_info:app_file_src(AppInfo, File)}
end;
try_handle_app_src_file(_, _AppDir, Other, _Validate) ->
throw({error, {multiple_app_files, Other}}).