Merge pull request #9584 from kjellwinblad/kjell/fix_jq_dont_start_port_programs_when_they_are_not_needed

fix: do not start jq port programs when they are not needed
This commit is contained in:
Zaiming (Stone) Shi 2022-12-20 13:47:52 +01:00 committed by GitHub
commit f19d649c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -248,7 +248,7 @@ defmodule EMQXUmbrella.MixProject do
] ++
if(enable_quicer?(), do: [quicer: :permanent], else: []) ++
if(enable_bcrypt?(), do: [bcrypt: :permanent], else: []) ++
if(enable_jq?(), do: [jq: :permanent], else: []) ++
if(enable_jq?(), do: [jq: :load], else: []) ++
if(is_app(:observer),
do: [observer: :load],
else: []
@ -519,7 +519,7 @@ defmodule EMQXUmbrella.MixProject do
|> Path.join("RELEASES")
|> File.open!([:write, :utf8], fn handle ->
IO.puts(handle, "%% coding: utf-8")
:io.format(handle, '~tp.~n', [release_entry])
:io.format(handle, ~c"~tp.~n", [release_entry])
end)
release

View File

@ -397,7 +397,9 @@ relx_apps(ReleaseType, Edition) ->
] ++
[quicer || is_quicer_supported()] ++
[bcrypt || provide_bcrypt_release(ReleaseType)] ++
[jq || is_jq_supported()] ++
%% Started automatically when needed (only needs to be started when the
%% port implementation is used)
[{jq, load} || is_jq_supported()] ++
[{observer, load} || is_app(observer)] ++
relx_apps_per_edition(Edition).