Skip to content

Commit

Permalink
Fully clean up after test utils for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ferd committed Dec 1, 2016
1 parent 8df95d5 commit 2c155ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/rebar_utils_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ proxy_auth(_Config, ProxyEnvKey) ->
rebar_utils:get_proxy_auth()),

%% restore original proxy specification if any
restore_proxy_env(ProxyEnvKey, OldProxySpec).
restore_proxy_env(ProxyEnvKey, OldProxySpec),
application:unset_env(rebar, proxy_auth).

restore_proxy_env(_, false) ->
ok;
restore_proxy_env(ProxyEnvKey, false) ->
os:putenv(ProxyEnvKey, "");
restore_proxy_env(ProxyEnvKey, ProxySpec) ->
os:putenv(ProxyEnvKey, ProxySpec).
os:putenv(ProxyEnvKey, ProxySpec).

0 comments on commit 2c155ea

Please sign in to comment.