guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: lint: Emit an ANSI erase-in-line sequence.


From: Ludovic Courtès
Subject: 01/02: lint: Emit an ANSI erase-in-line sequence.
Date: Thu, 14 Apr 2016 08:20:48 +0000

civodul pushed a commit to branch master
in repository guix.

commit 013c3fb8c70f0d651d8ae1b654fa70ccde815b53
Author: Danny Milosavljevic <address@hidden>
Date:   Fri Apr 8 17:59:12 2016 +0200

    lint: Emit an ANSI erase-in-line sequence.
    
    * guix/scripts/lint.scm (run-checkers): Add '\x1b[K' to progress
    messages and after 'for-each'.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 guix/scripts/lint.scm |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 27b9e15..d2fed67 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier <address@hidden>
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <address@hidden>
+;;; Copyright © 2016 Danny Milosavljevic <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -799,11 +800,14 @@ or a list thereof")
         (name (package-full-name package)))
     (for-each (lambda (checker)
                 (when tty?
-                  (format (current-error-port) "checking ~a [~a]...\r"
+                  (format (current-error-port) "checking ~a [~a]...\x1b[K\r"
                           name (lint-checker-name checker))
                   (force-output (current-error-port)))
                 ((lint-checker-check checker) package))
-              checkers)))
+              checkers)
+    (when tty?
+      (format (current-error-port) "\x1b[K")
+      (force-output (current-error-port)))))
 
 
 ;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]