Merge pull request #13340 from thalesmg/20240626-r572-fix-docs-conf-load
fix: don't crash if application is already loaded
This commit is contained in:
commit
263e654208
|
@ -163,8 +163,13 @@ dump_schema(Dir, SchemaModule) ->
|
||||||
),
|
),
|
||||||
emqx_dashboard:save_dispatch_eterm(SchemaModule).
|
emqx_dashboard:save_dispatch_eterm(SchemaModule).
|
||||||
|
|
||||||
load(emqx_enterprise_schema, emqx_telemetry) -> ignore;
|
load(emqx_enterprise_schema, emqx_telemetry) ->
|
||||||
load(_, Lib) -> ok = application:load(Lib).
|
ignore;
|
||||||
|
load(_, Lib) ->
|
||||||
|
case application:load(Lib) of
|
||||||
|
ok -> ok;
|
||||||
|
{error, {already_loaded, _}} -> ok
|
||||||
|
end.
|
||||||
|
|
||||||
%% for scripts/spellcheck.
|
%% for scripts/spellcheck.
|
||||||
gen_schema_json(Dir, SchemaModule, Lang) ->
|
gen_schema_json(Dir, SchemaModule, Lang) ->
|
||||||
|
|
Loading…
Reference in New Issue