[erlang-questions] otp 21.2

Andrew Thompson andrew@REDACTED
Sun Dec 16 01:30:03 CET 2018


On Sat, Dec 15, 2018 at 03:51:18PM -0800, Sam Overdorf wrote:
> This kind of defeats the purpose of an ".rc" file.
> The unix world uses them to set default behavior for scripts and programs.
> Now I have to remember to add "c:erlangrc()" to each of my programs.
> If I forget to do this then OOPs things don't work correctly.

This is like expecting bash shell scripts to source your ~/.bashrc.
.bashrc is only sourced for interactive shells, not non-interactive
shells, like the one invoked by the shebang line in a shell script.

Arguably you're relying on incorrect behaviour in escript and you should
adjust your usage accordingly.

Andrew



More information about the erlang-questions mailing list