aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym+a@scratchpost.org>2016-04-08 17:59:12 +0200
committerLudovic Courtès <ludo@gnu.org>2016-04-14 10:20:14 +0200
commit013c3fb8c70f0d651d8ae1b654fa70ccde815b53 (patch)
tree2a6ca86f206ac1ca8f844e24c8aca22e5f72ff06 /guix/scripts/lint.scm
parentfc1adab1487e5ea3c5f6341263df14414ba4e784 (diff)
downloadgnu-guix-013c3fb8c70f0d651d8ae1b654fa70ccde815b53.tar
gnu-guix-013c3fb8c70f0d651d8ae1b654fa70ccde815b53.tar.gz
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 <ludo@gnu.org>
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r--guix/scripts/lint.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 27b9e155ec..d2fed67e13 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
;;;
;;; 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)))))
;;;