How to write application environment value of node list?

允我心安 提交于 2019-12-24 04:18:10

问题


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?


回答1:


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'"]


来源:https://stackoverflow.com/questions/20106341/how-to-write-application-environment-value-of-node-list

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!