[erlang-questions] Problem with vm.args app env

Oliver Korpilla Oliver.Korpilla@REDACTED
Sat May 27 16:19:57 CEST 2017


Thank you, Jesper.

I wasn't aware such '" "' quoting was necessary in an vm.args file.

It solved my problem!

Again, thanks!

Oliver
 

Gesendet: Samstag, 27. Mai 2017 um 16:08 Uhr
Von: "Jesper Louis Andersen" <jesper.louis.andersen@REDACTED>
An: "Oliver Korpilla" <Oliver.Korpilla@REDACTED>, erlang-questions@REDACTED
Betreff: Re: [erlang-questions] Problem with vm.args app env

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[mailto: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[mailto:erlang-questions@REDACTED]
http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list