diff options
author | Ulf Wiger <ulf@feuerlabs.com> | 2012-12-16 21:30:15 +0100 |
---|---|---|
committer | Ulf Wiger <ulf@feuerlabs.com> | 2012-12-16 21:30:15 +0100 |
commit | 209ca73b91e7f787ad8c5545ad14610601a3972d (patch) | |
tree | 19c05e459ed71e36f16644c703f383f2699ffae8 /src | |
parent | 71c717d86bd92cce0111cb7c4975039784f74a71 (diff) |
rebar_eunit:reset_after_eunit/1 mustn't remove 'included_applications'
One could argue that rebar_eunit does some pretty dangerous stuff when
trying to clean up after a test run, but specifically, it tells the
Application Controller to delete everything returned by
application:get_all_env(App). Unfortunately, included_applications
also goes, which can lead to a crash in application_controller, if
the application is subsequently unloaded.
This patch attempts the smallest possible fix: remove all env
variables except included_applications.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_eunit.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index b82da0f..ebf2ee4 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -629,7 +629,8 @@ reset_after_eunit({OldProcesses, WasAlive, OldAppEnvs, _OldACs}) -> end, ok = application:unset_env(App, K) end || App <- Apps, App /= rebar, - {K, _V} <- application:get_all_env(App)], + {K, _V} <- application:get_all_env(App), + K =/= included_applications], reconstruct_app_env_vars(Apps), |