summaryrefslogtreecommitdiff
path: root/src/rebar_digraph.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-02-03 10:03:04 -0600
committerTristan Sloughter <t@crashfast.com>2015-02-03 19:04:11 -0600
commitd53fb93cc1365e7b42f71cf6206a844bcdbd0e98 (patch)
tree468701ebc5defc3ca391ce88bf1293f0ee03d74d /src/rebar_digraph.erl
parentd2cfe6a073d4d5d3092143c3925dacaab76ed472 (diff)
package dep names are binary, fix install deps and related tests
Diffstat (limited to 'src/rebar_digraph.erl')
-rw-r--r--src/rebar_digraph.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl
index 55d7272..3f942ef 100644
--- a/src/rebar_digraph.erl
+++ b/src/rebar_digraph.erl
@@ -40,15 +40,15 @@ add(Graph, {PkgName, Deps}) ->
end,
lists:foreach(fun(DepName) ->
- case DepName of
- {Name, _Vsn} ->
- Name;
- Name ->
- Name
- end,
- V3 = case digraph:vertex(Graph, Name) of
+ Name1 = case DepName of
+ {Name, _Vsn} ->
+ ec_cnv:to_binary(Name);
+ Name ->
+ ec_cnv:to_binary(Name)
+ end,
+ V3 = case digraph:vertex(Graph, Name1) of
false ->
- digraph:add_vertex(Graph, Name);
+ digraph:add_vertex(Graph, Name1);
{V2, []} ->
V2
end,
@@ -112,5 +112,5 @@ names_to_apps(Names, Apps) ->
-spec find_app_by_name(atom(), [rebar_app_info:t()]) -> {ok, rebar_app_info:t()} | error.
find_app_by_name(Name, Apps) ->
ec_lists:find(fun(App) ->
- binary_to_atom(rebar_app_info:name(App), utf8) =:= binary_to_atom(Name, utf8)
+ rebar_app_info:name(App) =:= Name
end, Apps).