How to write application environment value of node

2019-07-19 12:09发布

When using rebar for release, I have to set an environment variable. It is a node list. For example:

vm.args
# -zarah cluster_nodes ['zarah_slave_a@yus-iMac.local','zarah_slave_b@yus-iMac.local','emacs@yus-iMac.local']

But when running, the shell gives the error message:

*************
{error_logger,{{2013,11,20},{10,47,28}},"application_controller: ~ts: ~ts~n",[["syntax error before: ","'.'"],"[zarah_slave_a@yus-iMac.local,zarah_slave_b@yus-iMac.local,emacs@yus-iMac.local]"]}
Erlang R16B02 (erts-5.10.3) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:fals

I think it is the problem cause by "." in the node name. How to deal with it?

标签: erlang
1条回答
The star\"
2楼-- · 2019-07-19 13:03

Add a double quote before the single quote and it will work.

-zarah cluster_nodes ["'zarah_slave_a@yus-iMac.local'","'zarah_slave_b@yusiMac.local'","'emacs@yus-iMac.local'"]
查看更多
登录 后发表回答