build-self: Spin only on TTYs.

* build-aux/build-self.scm (build-program): Spin only when 'isatty?'
returns true.
This commit is contained in:
Ludovic Courtès 2019-01-08 13:31:54 +01:00
parent fefcb122ac
commit c108c46fb4
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 7 additions and 6 deletions

View File

@ -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)