<div dir="ltr">You can call set_env with the [{persistent, true}] option.<div><br></div><div>More information about it in the docs: <a href="http://www.erlang.org/doc/apps/kernel/application.html#set_env-3">http://www.erlang.org/doc/apps/kernel/application.html#set_env-3</a></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div></div></div>
<br><div class="gmail_quote">On Wed, May 27, 2015 at 10:39 PM, Serge Aleynikov <span dir="ltr"><<a href="mailto:serge@aleynikov.org" target="_blank">serge@aleynikov.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><font face="arial, helvetica, sans-serif"><a href="https://github.com/erlang/otp/pull/713" target="_blank">https://github.com/erlang/otp/pull/713</a></font><br></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><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"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><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"><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>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>