mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Fix Dialyzer warnings
This commit is contained in:
parent
9832a5c5c6
commit
8376693a3f
1 changed files with 12 additions and 12 deletions
|
@ -471,23 +471,23 @@ reset_after_eunit({OldProcesses, WasAlive, OldAppEnvs, _OldACs}) ->
|
||||||
if not WasAlive andalso IsAlive ->
|
if not WasAlive andalso IsAlive ->
|
||||||
?DEBUG("Stopping net kernel....\n", []),
|
?DEBUG("Stopping net kernel....\n", []),
|
||||||
erl_epmd:stop(),
|
erl_epmd:stop(),
|
||||||
net_kernel:stop(),
|
_ = net_kernel:stop(),
|
||||||
pause_until_net_kernel_stopped();
|
pause_until_net_kernel_stopped();
|
||||||
true ->
|
true ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
||||||
Processes = erlang:processes(),
|
Processes = erlang:processes(),
|
||||||
kill_extras(Processes -- OldProcesses),
|
_ = kill_extras(Processes -- OldProcesses),
|
||||||
|
|
||||||
OldApps = [App || {App, _} <- OldAppEnvs],
|
OldApps = [App || {App, _} <- OldAppEnvs],
|
||||||
Apps = get_app_names(),
|
Apps = get_app_names(),
|
||||||
[begin
|
_ = [begin
|
||||||
case lists:member(App, OldApps) of
|
_ = case lists:member(App, OldApps) of
|
||||||
true -> ok;
|
true -> ok;
|
||||||
false -> application:stop(App)
|
false -> application:stop(App)
|
||||||
end,
|
end,
|
||||||
application:unset_env(App, K)
|
ok = application:unset_env(App, K)
|
||||||
end || App <- Apps, App /= rebar,
|
end || App <- Apps, App /= rebar,
|
||||||
{K, _V} <- application:get_all_env(App)],
|
{K, _V} <- application:get_all_env(App)],
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ kill_extras(Pids) ->
|
||||||
?DEBUG("No processes to kill\n", []),
|
?DEBUG("No processes to kill\n", []),
|
||||||
[];
|
[];
|
||||||
Else ->
|
Else ->
|
||||||
[wait_until_dead(Pid) || Pid <- Else],
|
lists:foreach(fun(Pid) -> wait_until_dead(Pid) end, Else),
|
||||||
Else
|
Else
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ reconstruct_app_env_vars([App|Apps]) ->
|
||||||
end,
|
end,
|
||||||
AllVars = CmdVars ++ AppVars,
|
AllVars = CmdVars ++ AppVars,
|
||||||
?DEBUG("Reconstruct ~p ~p\n", [App, AllVars]),
|
?DEBUG("Reconstruct ~p ~p\n", [App, AllVars]),
|
||||||
[application:set_env(App, K, V) || {K, V} <- AllVars],
|
lists:foreach(fun({K, V}) -> application:set_env(App, K, V) end, AllVars),
|
||||||
reconstruct_app_env_vars(Apps);
|
reconstruct_app_env_vars(Apps);
|
||||||
reconstruct_app_env_vars([]) ->
|
reconstruct_app_env_vars([]) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
Loading…
Reference in a new issue