From 65bb71cccaf215d8b1121ed164d9ecb4bf240540 Mon Sep 17 00:00:00 2001 From: Spycsh <39623753+Spycsh@users.noreply.github.com> Date: Fri, 27 Aug 2021 14:24:12 +0800 Subject: [PATCH] fix(rebar): make compatible to Windows --- rebar.config.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rebar.config.erl b/rebar.config.erl index be08dc68c..ad24e6479 100644 --- a/rebar.config.erl +++ b/rebar.config.erl @@ -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) ->