summaryrefslogtreecommitdiff
path: root/src/rebar_packages.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_packages.erl')
-rw-r--r--src/rebar_packages.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rebar_packages.erl b/src/rebar_packages.erl
index b3a7542..cd979fa 100644
--- a/src/rebar_packages.erl
+++ b/src/rebar_packages.erl
@@ -4,7 +4,7 @@
-include("rebar.hrl").
--spec get_packages(rebar_state:t()) -> {rebar_dict(), tuple()}.
+-spec get_packages(rebar_state:t()) -> {rebar_dict(), rlx_depsolver:t()}.
get_packages(State) ->
RebarDir = rebar_state:get(State, global_rebar_dir, filename:join(os:getenv("HOME"), ".rebar")),
PackagesFile = filename:join(RebarDir, "packages"),
@@ -12,13 +12,13 @@ get_packages(State) ->
true ->
try
{ok, Binary} = file:read_file(PackagesFile),
- {List, Graph} = binary_to_term(Binary),
- {List, Graph}
+ {Dict, Graph} = binary_to_term(Binary),
+ {Dict, Graph}
catch
_:_ ->
?ERROR("Bad packages index, try to fix with `rebar update`~n", []),
- {[], rlx_depsolver:new_graph()}
+ {dict:new(), rlx_depsolver:new_graph()}
end;
false ->
- {[], rlx_depsolver:new_graph()}
+ {dict:new(), rlx_depsolver:new_graph()}
end.