summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/status.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/status.scm b/guix/status.scm
index e3375816c5..bd382baf7a 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -465,8 +465,15 @@ addition to build events."
             (_
              (spin! port))))))
 
+  (define erase-current-line*
+    (if (isatty?* port)
+        (lambda (port)
+          (erase-current-line port)
+          (force-output port))
+        (const #t)))
+
   (unless print-log?
-    (display "\r" port))                          ;erase the spinner
+    (erase-current-line* port))             ;clear the spinner or progress bar
   (match event
     (('build-started drv . _)
      (let ((properties (derivation-properties