summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_prv_upgrade.erl15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/rebar_prv_upgrade.erl b/src/rebar_prv_upgrade.erl
index 50e1452..8c1c84e 100644
--- a/src/rebar_prv_upgrade.erl
+++ b/src/rebar_prv_upgrade.erl
@@ -12,7 +12,7 @@
-include("rebar.hrl").
-define(PROVIDER, upgrade).
--define(DEPS, [lock]).
+-define(DEPS, []).
%% ===================================================================
%% Public API
@@ -37,18 +37,13 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
{Args, _} = rebar_state:command_parsed_args(State),
- Name = proplists:get_value(package, Args),
+ Name = ec_cnv:to_binary(proplists:get_value(package, Args)),
Locks = rebar_state:get(State, locks, []),
- case lists:keyfind(ec_cnv:to_binary(Name), 1, Locks) of
+ case lists:keyfind(Name, 1, Locks) of
{_, _, _, Level} ->
Deps = rebar_state:get(State, deps),
- Dep = lists:keyfind(list_to_atom(Name), 1, Deps),
- rebar_prv_install_deps:handle_deps(State, [Dep], {true, ec_cnv:to_binary(Name), Level}),
- {ok, State};
- {_, _, _, _, Level} ->
- Deps = rebar_state:get(State, deps),
- Dep = lists:keyfind(list_to_atom(Name), 1, Deps),
- rebar_prv_install_deps:handle_deps(State, [Dep], {true, ec_cnv:to_binary(Name), Level}),
+ Dep = lists:keyfind(binary_to_atom(Name, utf8), 1, Deps),
+ rebar_prv_install_deps:handle_deps(State, [Dep], {true, Name, Level}),
{ok, State};
_ ->
{error, io_lib:format("No such dependency ~s~n", [Name])}