summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_prv_do.erl22
-rw-r--r--src/rebar_prv_install_deps.erl11
2 files changed, 24 insertions, 9 deletions
diff --git a/src/rebar_prv_do.erl b/src/rebar_prv_do.erl
index c2bbe2b..5dec7d8 100644
--- a/src/rebar_prv_do.erl
+++ b/src/rebar_prv_do.erl
@@ -33,13 +33,21 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
Tasks = args_to_tasks(rebar_state:command_args(State)),
- lists:foldl(fun(TaskArgs, {ok, StateAcc}) ->
- [TaskStr | Args] = string:tokens(TaskArgs, " "),
- Task = list_to_atom(TaskStr),
- StateAcc1 = rebar_state:set(StateAcc, task, Task),
- StateAcc2 = rebar_state:command_args(StateAcc1, Args),
- rebar_core:process_command(StateAcc2, Task)
- end, {ok, State}, Tasks).
+ do_tasks(Tasks, State).
+
+do_tasks([], State) ->
+ {ok, State};
+do_tasks([TaskArgs | Tail], State) ->
+ [TaskStr | Args] = string:tokens(TaskArgs, " "),
+ Task = list_to_atom(TaskStr),
+ State1 = rebar_state:set(State, task, Task),
+ State2 = rebar_state:command_args(State1, Args),
+ case rebar_core:process_command(State2, Task) of
+ {ok, State3} ->
+ do_tasks(Tail, State3);
+ Error ->
+ Error
+ end.
-spec format_error(any()) -> iolist().
format_error(Reason) ->
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 1253edd..2247277 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -230,9 +230,16 @@ package_to_app(DepsDir, Packages, {Name, Vsn}) ->
update_src_deps(Profile, Level, SrcDeps, PkgDeps, SrcApps, State, Update, Seen, Locks) ->
case lists:foldl(fun(AppInfo, {SrcDepsAcc, PkgDepsAcc, SrcAppsAcc, StateAcc, SeenAcc, LocksAcc}) ->
%% If not seen, add to list of locks to write out
- case sets:is_element(rebar_app_info:name(AppInfo), SeenAcc) of
+ Name = rebar_app_info:name(AppInfo),
+ case sets:is_element(Name, SeenAcc) of
true ->
- warn_skip_deps(AppInfo),
+ %% If from lock file don't print warning about skipping
+ case lists:keymember(Name, 1, Locks) of
+ false ->
+ warn_skip_deps(AppInfo);
+ true ->
+ ok
+ end,
{SrcDepsAcc, PkgDepsAcc, SrcAppsAcc, StateAcc, SeenAcc, LocksAcc};
false ->
{SeenAcc1, StateAcc1} = maybe_lock(Profile, AppInfo, SeenAcc, StateAcc, Level),