소스 검색

Merge pull request #5583 from Spycsh/master

fix(rebar): make compatible to Windows
Zaiming (Stone) Shi 4 년 전
부모
커밋
5ba396afb3
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      rebar.config.erl

+ 4 - 1
rebar.config.erl

@@ -382,7 +382,10 @@ emqx_etc_overlay_common() ->
     ].
     ].
 
 
 get_vsn() ->
 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}]).
     re:replace(PkgVsn, "\n", "", [{return ,list}]).
 
 
 maybe_dump(Config) ->
 maybe_dump(Config) ->