[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.6-10-gbbc8975

Francesco Poli (wintermute) invernomuto at paranoici.org
Sun May 13 21:07:14 UTC 2012


The following commit has been merged in the master branch:
commit 641dbde547c511906223bb2f60b6b1e9d8faa741
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Sat May 12 18:09:56 2012 +0200

    do not warn the user uselessly
    
    If we are already in a non-interactive (failure or success) mode,
    we should not warn the user that we are switching to non-interactive
    failure mode: doing so would be either useless or inaccurate.

diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index f139f80..3dff4ea 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -178,9 +178,11 @@ class AppConfig
       test_tty = File.open("/dev/tty")
       test_tty.close if test_tty
     rescue
-      $stderr.puts _("W: cannot open /dev/tty: running inside su -c \"command\"? switching to non-interactive failure mode, please see README.Debian.")
+      if @yes.nil?
+        $stderr.puts _("W: cannot open /dev/tty: running inside su -c \"command\"? switching to non-interactive failure mode, please see README.Debian.")
+        @yes = false
+      end
       @quiet = true
-      @yes = false if @yes.nil?
     end
 
     @title = "Debian Bugs (#{@severity.join(', ')})" if ! @title

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list