fix: bad crash_dump_file default value in rpm

This commit is contained in:
Zhongwen Deng 2023-01-17 20:47:54 +08:00
parent cf99089f84
commit f98786c91f
2 changed files with 11 additions and 2 deletions

View File

@ -487,7 +487,7 @@ fields("node") ->
#{
mapping => "vm_args.-env ERL_CRASH_DUMP",
desc => ?DESC(node_crash_dump_file),
default => "log/erl_crash.dump",
default => crash_dump_file_default(),
'readOnly' => true
}
)},
@ -1296,6 +1296,15 @@ sort_log_levels(Levels) ->
Levels
).
crash_dump_file_default() ->
case os:getenv("RUNNER_LOG_DIR") of
false ->
%% testing, or running emqx app as deps
"log/erl_crash.dump";
Dir ->
[filename:join([Dir, "erl_crash.dump"])]
end.
%% utils
-spec conf_get(string() | [string()], hocon:config()) -> term().
conf_get(Key, Conf) ->

View File

@ -3,7 +3,7 @@
{id, "emqx_machine"},
{description, "The EMQX Machine"},
% strict semver, bump manually!
{vsn, "0.1.2"},
{vsn, "0.1.3"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib]},