guix-commits
[Top][All Lists]
Advanced

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

01/03: build-self: Spin only on TTYs.


From: guix-commits
Subject: 01/03: build-self: Spin only on TTYs.
Date: Tue, 8 Jan 2019 12:38:21 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit c108c46fb40ae85be609133f6706cfb79266ded3
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 8 13:31:54 2019 +0100

    build-self: Spin only on TTYs.
    
    * build-aux/build-self.scm (build-program): Spin only when 'isatty?'
    returns true.
---
 build-aux/build-self.scm | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index c1a253d..87a45d9 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -334,12 +334,13 @@ interface (FFI) of Guile.")
                         (format (current-error-port)
                                 "Computing Guix derivation for '~a'...  "
                                 system)
-                        (let loop ((spin spin))
-                          (display (string-append "\b" (car spin))
-                                   (current-error-port))
-                          (force-output (current-error-port))
-                          (sleep 1)
-                          (loop (cdr spin))))
+                        (when (isatty? (current-error-port))
+                          (let loop ((spin spin))
+                            (display (string-append "\b" (car spin))
+                                     (current-error-port))
+                            (force-output (current-error-port))
+                            (sleep 1)
+                            (loop (cdr spin)))))
 
                       (match (command-line)
                         ((_ source system version protocol-version)



reply via email to

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