Merge pull request #5583 from Spycsh/master

fix(rebar): make compatible to Windows
This commit is contained in:
Zaiming (Stone) Shi 2021-08-27 12:44:36 +02:00 committed by GitHub
commit 5ba396afb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -382,7 +382,10 @@ emqx_etc_overlay_common() ->
].
get_vsn() ->
PkgVsn = os:cmd("./pkg-vsn.sh"),
%% to make it compatible to Linux and Windows,
%% we must use bash to execute the bash file
%% because "./" will not be recognized as an internal or external command
PkgVsn = os:cmd("bash pkg-vsn.sh"),
re:replace(PkgVsn, "\n", "", [{return ,list}]).
maybe_dump(Config) ->