aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-07 22:07:53 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-07 23:46:39 +0100
commit4a8d536ffe4cac1822d9655e0871fdc1684d569b (patch)
treea7b92c2e0bfa2d85f07083b765bae2fa008b6276
parentb94f250e5a8a2263a89f61c6d3f7a69abe2984e3 (diff)
downloadpatches-4a8d536ffe4cac1822d9655e0871fdc1684d569b.tar
patches-4a8d536ffe4cac1822d9655e0871fdc1684d569b.tar.gz
ui: Display hints that come along with '&message' conditions.
* guix/ui.scm (call-with-error-handling): Add case for message and fix-hint?.
-rw-r--r--guix/ui.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 6e08a611cd..895179744b 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -623,6 +623,12 @@ directories:~{ ~a~}~%")
(location->string (error-location c))
(gettext (condition-message c) %gettext-domain))
(exit 1))
+ ((and (message-condition? c) (fix-hint? c))
+ (format (current-error-port) "~a: error: ~a~%"
+ (program-name)
+ (gettext (condition-message c) %gettext-domain))
+ (display-hint (condition-fix-hint c))
+ (exit 1))
((message-condition? c)
;; Normally '&message' error conditions have an i18n'd message.
(leave (G_ "~a~%")