[erlang-questions] Problem with vm.args app env
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Sat May 27 16:08:25 CEST 2017
You are trying to use `name-of-config.sml` as an erlang term. It isn't
valid because it is not a valid erlang term since it has a . in it. You can
wrap it in quotes to make it a string. Do note that variable expansion in
the shell may affect you, so we wrap it in single quotes to avoid variable
expansion inside. Example:
[jlouis@REDACTED ~]$ erl -kernel config '"name-of-config.xml"'
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.0 (abort with ^G)
1> application:get_env(kernel, config).
{ok,"name-of-config.xml"}
On Sat, May 27, 2017 at 1:17 PM Oliver Korpilla <Oliver.Korpilla@REDACTED>
wrote:
> Hello,
>
> I have a vm.args file and I try to do the following:
>
> -my_app config name-of-config.xml
>
> where my_app is indeed the name of the application.
>
> But I get:
>
> {"init terminating in do_boot",{error,'Bad environment variable:
> "name-of-config.xml" Application: my_app'}}
>
> I get this also if I write:
>
> -my_app config 'name-of-config.xml'
> -my_app config "name-of-config.xml"
>
> I just want to pass a few configuration parameters in but it does not seem
> to work.
>
> Thank you,
> Oliver
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170527/15d5b0f4/attachment.htm>
More information about the erlang-questions
mailing list