You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my foo.conf file, if I want to use a blank password, I try the following:
db.password =
I get the following error:
escript: exception error: no function clause matching
lists:unzip({[{["nodename"],"foo"},
{["distributed_cookie"],"foo"},
{["audit","root"],"/tmp"},
{["db","hostname"],
"localhost"},
{["db","database"],
"foo"},
{["db","username"],
"meh"}],
<<"db.password =\n">>,
{{line,12},{column,1}}},
[],[]) (lists.erl, line 387)
in function cuttlefish_conf:file/1 (src/cuttlefish_conf.erl, line 71)
in call from cuttlefish_conf:'-files/1-fun-1-'/2 (src/cuttlefish_conf.erl, line 45)
in call from lists:foldl/3 (lists.erl, line 1248)
in call from cuttlefish_conf:files/1 (src/cuttlefish_conf.erl, line 43)
in call from cuttlefish_escript:load_conf/1 (src/cuttlefish_escript.erl, line 307)
in call from cuttlefish_escript:engage_cuttlefish/1 (src/cuttlefish_escript.erl, line 360)
in call from cuttlefish_escript:generate/1 (src/cuttlefish_escript.erl, line 259)
The text was updated successfully, but these errors were encountered:
That happens because the result of the parse is not checked strictly. conf_parse:file/1 returns list() on success and {list(), binary(), {{line,pos_integer()},{column,pos_integer()}}} on incomplete parse.
Assigning to 2.1 milestone, if necessary we can move it up.
Sorry, more to the point - I doubt the "empty string" will be a valid RHS in this format, ever. It would be better to define an atom value, or other setting that disables the password. Also, if you don't have a default for the setting, it will remain unset.
In your schema example, this is the case. The user need only omit the setting from the conf file for the password to be empty/unset.
I have a mapping:
In my foo.conf file, if I want to use a blank password, I try the following:
I get the following error:
The text was updated successfully, but these errors were encountered: