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:
Thales Macedo Garitezi 2024-06-26 15:15:49 -03:00 committed by GitHub
commit 263e654208
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -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) ->