summaryrefslogtreecommitdiff
path: root/src/rebar_app_info.erl
diff options
context:
space:
mode:
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().