fix: node.config_files type is hocon:array(string()))

This commit is contained in:
Zhongwen Deng 2023-01-13 23:30:00 +08:00
parent c9f0355f5a
commit 1fe0061123
2 changed files with 4 additions and 2 deletions

View File

@ -408,7 +408,9 @@ catch_call(F) ->
C:E:S ->
{crashed, {C, E, S}}
end.
force_set_config_file_paths(emqx_conf, Paths) ->
force_set_config_file_paths(emqx_conf, [Path] = Paths) ->
Bin = iolist_to_binary(io_lib:format("node.config_files = [~p]", [Path])),
ok = file:write_file(Path, Bin, [append]),
application:set_env(emqx, config_files, Paths);
force_set_config_file_paths(emqx, Paths) ->
application:set_env(emqx, config_files, Paths);

View File

@ -463,7 +463,7 @@ fields("node") ->
)},
{"config_files",
sc(
list(string()),
hoconsc:array(string()),
#{
mapping => "emqx.config_files",
default => undefined,