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

View file

@ -334,12 +334,13 @@ (define spin
(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)