Commit eb98920644a3a8037077d6277cbe9e70c17b0981

Thomas de Grivel 2022-06-26T17:47:01

disable System.cmd du -ks

diff --git a/lib/kmxgit/git.ex b/lib/kmxgit/git.ex
index 9bca9f0..1946357 100644
--- a/lib/kmxgit/git.ex
+++ b/lib/kmxgit/git.ex
@@ -10,15 +10,21 @@ defmodule Kmxgit.Git do
     "#{@git_root}/#{repo}.git"
   end
 
+  @disable_du true
+
   def du_ks(path) do
-    {out, status} = System.cmd("du", ["-ks", path], stderr_to_stdout: true)
-    case status do
-      0 ->
-        {k, _} = Integer.parse(out)
-        k
-      x ->
-        IO.inspect(x)
-        0
+    if @disable_du do
+      0
+    else
+      {out, status} = System.cmd("du", ["-ks", path], stderr_to_stdout: true)
+      case status do
+        0 ->
+          {k, _} = Integer.parse(out)
+          k
+        x ->
+          IO.inspect(x)
+          0
+      end
     end
   end