summaryrefslogtreecommitdiff
path: root/src/rebar_digraph.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2014-12-02 15:55:51 -0600
committerTristan Sloughter <tristan.sloughter@gmail.com>2014-12-02 15:55:51 -0600
commit3b2d9ba8c81a41ae5cd554a3f50283e713e191c8 (patch)
treef5309346fc164fe3556e96db679b32bf5eca5a56 /src/rebar_digraph.erl
parent8d655d3c502295394ab30d9fc3fd11679629885d (diff)
parent3af351cec28521caaa15308b1a4a992380723794 (diff)
Merge pull request #31 from tsloughter/profiles
Profiles
Diffstat (limited to 'src/rebar_digraph.erl')
-rw-r--r--src/rebar_digraph.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl
index 27bbdd2..bb031cb 100644
--- a/src/rebar_digraph.erl
+++ b/src/rebar_digraph.erl
@@ -32,9 +32,15 @@ add(Graph, {PkgName, Deps}) ->
end,
lists:foreach(fun(DepName) ->
- V3 = case digraph:vertex(Graph, DepName) of
+ case DepName of
+ {Name, _Vsn} ->
+ Name;
+ Name ->
+ Name
+ end,
+ V3 = case digraph:vertex(Graph, Name) of
false ->
- digraph:add_vertex(Graph, DepName);
+ digraph:add_vertex(Graph, Name);
{V2, []} ->
V2
end,
@@ -94,5 +100,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) ->
- ec_cnv:to_atom(rebar_app_info:name(App)) =:= ec_cnv:to_atom(Name)
+ binary_to_atom(rebar_app_info:name(App), utf8) =:= binary_to_atom(Name, utf8)
end, Apps).