fix(emqx_vm): trim new-line in otp version string

This commit is contained in:
Zaiming (Stone) Shi 2023-11-29 09:50:31 +01:00
parent f4d873e572
commit 89cdfbca63
1 changed files with 3 additions and 0 deletions

View File

@ -418,6 +418,9 @@ get_otp_version() ->
end.
read_otp_version() ->
string:trim(do_read_otp_version()).
do_read_otp_version() ->
ReleasesDir = filename:join([code:root_dir(), "releases"]),
Filename = filename:join([ReleasesDir, emqx_app:get_release(), "BUILD_INFO"]),
case file:read_file(Filename) of