summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-09 10:36:28 +0100
committerLudovic Courtès <ludo@gnu.org>2022-03-18 16:03:32 +0100
commit9e0f0123a018f7fb81779d858942ba01150a12ee (patch)
tree8b3cc0f73191144a5b7d2b08b67bc35739507b5c /guix/ui.scm
parent2da0f2828b5ef58b87eb0f4aed942748e6682f2f (diff)
ui: 'show-what-to-build' highlights "The following [...] will be built".
* guix/colors.scm (highlight/warn): New procedure. * guix/ui.scm (show-what-to-build): Use 'highlight/warn' when displaying what would/will be built.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm24
1 files changed, 14 insertions, 10 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 238952723e..8e4e3e2dfc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1031,12 +1031,14 @@ summary, and level 0 shows nothing."
;; Unfortunately, this is hardly avoidable for proper i18n.
(if dry-run?
(begin
- (unless (zero? verbosity)
+ (unless (or (zero? verbosity) (null? build))
(format (current-error-port)
- (N_ "~:[The following derivation would be built:~%~{ ~a~%~}~;~]"
- "~:[The following derivations would be built:~%~{ ~a~%~}~;~]"
- (length build))
- (null? build) (map colorized-store-item build)))
+ (highlight/warn
+ (N_ "The following derivation would be built:~%"
+ "The following derivations would be built:~%"
+ (length build))))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
(format (current-error-port)
@@ -1082,12 +1084,14 @@ summary, and level 0 shows nothing."
(null? download) (length download))))))
(begin
- (unless (zero? verbosity)
+ (unless (or (zero? verbosity) (null? build))
(format (current-error-port)
- (N_ "~:[The following derivation will be built:~%~{ ~a~%~}~;~]"
- "~:[The following derivations will be built:~%~{ ~a~%~}~;~]"
- (length build))
- (null? build) (map colorized-store-item build)))
+ (highlight/warn
+ (N_ "The following derivation will be built:~%"
+ "The following derivations will be built:~%"
+ (length build))))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
(format (current-error-port)