Browse Source

fix: prevents forward slashes in a JSON string from being escaped

JimMoen 1 năm trước cách đây
mục cha
commit
7162c262e2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/emqx_plugrel.erl

+ 1 - 1
src/emqx_plugrel.erl

@@ -125,7 +125,7 @@ make_tar(#{name := Name, rel_vsn := Vsn, rel_apps := Apps} = Info, State) ->
     ok = filelib:ensure_dir(InfoFile),
     ok = maybe_copy_files(LibDir),
     %% write info file
-    ok = file:write_file(InfoFile, jsone:encode(Info, [{space, 1}, {indent, 4}])),
+    ok = file:write_file(InfoFile, jsone:encode(Info, [native_forward_slash, {space, 1}, {indent, 4}])),
     %% copy apps to lib dir
     Sources = lists:map(fun(App) -> filename:join([BaseDir, "rel", Name, "lib", App]) end, Apps),
     ok = rebar_file_utils:cp_r(Sources, LibDir),