Commit c0640f0fd63ce3e2a8c50c29a44002242aae2dcd

Thomas de Grivel 2023-11-10T09:26:31

flush

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index 48fed2b..b1cf4de 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -509,8 +509,11 @@ def cmd(string)
   IO.popen("#{string} 2>&1", "r") do |pipe|
     while line = pipe.gets()
       $log.puts line
-      puts line if Rbpkg.verbose_level > 1
-      $stdout.flush
+      $log.flush
+      if Rbpkg.verbose_level > 1
+        puts line
+        $stdout.flush
+      end
     end
     pipe.close
     $?.success?