mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
status: Erase the progress bar or spinner.
Previously the progress bar wouldn't be erased by the time the next "building foo" line would be printed. * guix/status.scm (print-build-event)[erase-current-line*]: New procedure. Call it instead of (display "\r").
This commit is contained in:
parent
3869effdd5
commit
7473bce207
1 changed files with 8 additions and 1 deletions
|
@ -465,8 +465,15 @@ (define print-log-line
|
||||||
(_
|
(_
|
||||||
(spin! port))))))
|
(spin! port))))))
|
||||||
|
|
||||||
|
(define erase-current-line*
|
||||||
|
(if (isatty?* port)
|
||||||
|
(lambda (port)
|
||||||
|
(erase-current-line port)
|
||||||
|
(force-output port))
|
||||||
|
(const #t)))
|
||||||
|
|
||||||
(unless print-log?
|
(unless print-log?
|
||||||
(display "\r" port)) ;erase the spinner
|
(erase-current-line* port)) ;clear the spinner or progress bar
|
||||||
(match event
|
(match event
|
||||||
(('build-started drv . _)
|
(('build-started drv . _)
|
||||||
(let ((properties (derivation-properties
|
(let ((properties (derivation-properties
|
||||||
|
|
Loading…
Reference in a new issue