25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Handle case when elixir support is enabled but not available

This happens when:
./configure --with-rebar=rebar3 --enable-elixir
make
rebar3 ct
This commit is contained in:
Badlop 2024-07-19 17:57:30 +02:00
parent 4e35515a8c
commit bc7c8e3952

View File

@ -175,7 +175,11 @@ file_queue_init() ->
-ifdef(ELIXIR_ENABLED). -ifdef(ELIXIR_ENABLED).
is_using_elixir_config() -> is_using_elixir_config() ->
Config = ejabberd_config:path(), Config = ejabberd_config:path(),
'Elixir.Ejabberd.ConfigUtil':is_elixir_config(Config). try 'Elixir.Ejabberd.ConfigUtil':is_elixir_config(Config) of
B when is_boolean(B) -> B
catch
_:_ -> false
end.
setup_if_elixir_conf_used() -> setup_if_elixir_conf_used() ->
case is_using_elixir_config() of case is_using_elixir_config() of