Browse Source

refactor(docs): use var for output filepath

Thales Macedo Garitezi 3 năm trước cách đây
mục cha
commit
a0e11f75d9
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      scripts/merge-i18n.escript

+ 3 - 2
scripts/merge-i18n.escript

@@ -10,8 +10,9 @@ main(_) ->
     Conf = [merge(Conf0, Cfgs1),
             io_lib:nl()
            ],
-    ok = filelib:ensure_dir("apps/emqx_dashboard/priv/i18n.conf"),
-    ok = file:write_file("apps/emqx_dashboard/priv/i18n.conf", Conf).
+    OutputFile = "apps/emqx_dashboard/priv/i18n.conf",
+    ok = filelib:ensure_dir(OutputFile),
+    ok = file:write_file(OutputFile, Conf).
 
 merge(BaseConf, Cfgs) ->
     lists:foldl(