summaryrefslogtreecommitdiff
path: root/src/rebar_app_info.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-09-20 22:36:54 -0500
committerTristan Sloughter <t@crashfast.com>2014-09-20 22:36:54 -0500
commite1b1152b219cf65c7f8cd3b77db5cf2156fcbab7 (patch)
treee452a4e053afd186900b54fbff9a169f81dd3726 /src/rebar_app_info.erl
parentc8772ff398e43a535d6c145ce3ed0d31952f907e (diff)
slowly widdling away at dialyzer errors
Diffstat (limited to 'src/rebar_app_info.erl')
-rw-r--r--src/rebar_app_info.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl
index 44394b3..403a5d1 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -87,13 +87,12 @@ new(AppName, Vsn, Dir, Deps) ->
deps=Deps}}.
%% @doc discover a complete version of the app info with all fields set.
--spec discover(file:name()) ->
- {ok, t()}.
+-spec discover(file:name()) -> {ok, t()} | not_found.
discover(Dir) ->
case rebar_app_discover:find_app(Dir, all) of
{true, AppInfo} ->
{ok, AppInfo};
- _ ->
+ false ->
not_found
end.
@@ -157,7 +156,7 @@ app_details(AppInfo=#app_info_t{}, AppDetails) ->
original_vsn(#app_info_t{original_vsn=Vsn}) ->
Vsn.
--spec original_vsn(t(), string()) -> string().
+-spec original_vsn(t(), string()) -> t().
original_vsn(AppInfo=#app_info_t{}, Vsn) ->
AppInfo#app_info_t{original_vsn=Vsn}.
@@ -172,7 +171,7 @@ deps(AppInfo=#app_info_t{}, Deps) ->
dep_level(AppInfo=#app_info_t{}, Level) ->
AppInfo#app_info_t{dep_level=Level}.
-dep_level(AppInfo=#app_info_t{dep_level=Level}) ->
+dep_level(#app_info_t{dep_level=Level}) ->
Level.
-spec dir(t()) -> file:name().