guix-commits
[Top][All Lists]
Advanced

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

02/06: substitute: Erase the current line when reporting progress.


From: Ludovic Courtès
Subject: 02/06: substitute: Erase the current line when reporting progress.
Date: Tue, 12 Jun 2018 09:23:43 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 4c97a368a698ccf89113a258e8cf5e7947fbcc08
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jun 12 09:28:28 2018 +0200

    substitute: Erase the current line when reporting progress.
    
    * guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Use
    the ANSI erase-current-line sequence next to \r.
---
 guix/scripts/substitute.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 8e1119f..ab52245 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -613,7 +613,7 @@ if file doesn't exist, and the narinfo otherwise."
     (let ((done 0)
           (total (length paths)))
       (lambda ()
-        (display #\cr (current-error-port))
+        (display "\r\x1b[K" (current-error-port)) ;erase current line
         (force-output (current-error-port))
         (format (current-error-port)
                 (G_ "updating list of substitutes from '~a'... ~5,1f%")



reply via email to

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