fix(nodetool): ensure patches dir added for rpm/deb installs

This commit is contained in:
Zaiming (Stone) Shi 2023-09-04 10:04:14 +02:00
parent 2c9220133c
commit d0ccd80850
1 changed files with 4 additions and 1 deletions

View File

@ -358,7 +358,10 @@ add_libs_dir() ->
%% rel file was been deleted by release handler %% rel file was been deleted by release handler
error({failed_to_read_RELEASES_file, RelFile, Reason}) error({failed_to_read_RELEASES_file, RelFile, Reason})
end, end,
PatchesDir = filename:join([RootDir, "data", "patches"]), ok = add_patches_dir(filename:join([RootDir, "data", "patches"])),
ok = add_patches_dir("/var/lib/emqx/patches").
add_patches_dir(PatchesDir) ->
case filelib:is_dir(PatchesDir) of case filelib:is_dir(PatchesDir) of
true -> true ->
true = code:add_patha(PatchesDir), true = code:add_patha(PatchesDir),