<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I run into an issue while trying to fix a test case in this pull request:</div><div class="gmail_default" style><font face="arial, helvetica, sans-serif"><a href="https://github.com/erlang/otp/pull/713">https://github.com/erlang/otp/pull/713</a></font><br></div><div class="gmail_default" style><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style><font face="arial, helvetica, sans-serif">Is it possible to override application's startup environment dynamically if its *.app file contains an {env, [...]} clause?</font></div><div class="gmail_default" style><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style><font face="arial, helvetica, sans-serif">I had the following in the test case, in which my {file, File} setting would get discarded:</font></div><div class="gmail_default" style><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.8999996185303px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.8999996185303px;padding:0px;margin:0px;border-radius:3px;word-break:normal;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background:transparent"> SaslEnv = application:get_all_env(sasl),
lists:foreach(fun({E,_V}) -> application:unset_env(sasl,E) end, SaslEnv),
ok = application:set_env(sasl,sasl_error_logger,{file, File}),
ok = application:start(sasl),</code></pre><pre style="overflow:auto;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(247,247,247)"><code style="padding:0px;margin:0px;border-radius:3px;word-break:normal;border:0px;display:inline;max-width:initial;overflow:initial;line-height:inherit;word-wrap:normal;background-image:initial;background-color:transparent;background-repeat:initial"><font face="arial, helvetica, sans-serif">Serge</font></code></pre></div></div>