瀏覽代碼

refactor(nodetool): only add libs when necessary

Zaiming (Stone) Shi 2 年之前
父節點
當前提交
ad09ca9d6d
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 2 1
      bin/nodetool
  2. 3 0
      changes/ce/feat-11787.en.md

+ 2 - 1
bin/nodetool

@@ -21,12 +21,13 @@ main(Args) ->
                     ok
             end
     end,
-    ok = add_libs_dir(),
     case Args of
         ["hocon" | Rest] ->
+            ok = add_libs_dir(),
             %% forward the call to hocon_cli
             hocon_cli:main(Rest);
         ["check_license_key", Key0] ->
+            ok = add_libs_dir(),
             Key = cleanup_key(Key0),
             check_license(#{key => Key});
         _ ->

+ 3 - 0
changes/ce/feat-11787.en.md

@@ -0,0 +1,3 @@
+Improve `emqx` command performance.
+
+Avoid loading EMQX application code in `nodetool` script unless necessary.