aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/ui.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 7490de080c..2140c2e50b 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -446,8 +446,14 @@ interpreted."
(lambda ()
(eval exp (force %guix-user-module)))
(lambda args
- (leave (_ "failed to evaluate expression `~a': ~s~%")
- exp args)))))
+ (report-error (_ "failed to evaluate expression '~a':~%") exp)
+ (match args
+ (('syntax-error proc message properties form . rest)
+ (report-error (_ "syntax error: ~a~%") message))
+ ((error args ...)
+ (apply display-error #f (current-error-port) args))
+ (what? #f))
+ (exit 1)))))
(define (read/eval-package-expression str)
"Read and evaluate STR and return the package it refers to, or exit an