aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/gc.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/gc.scm')
-rw-r--r--guix/scripts/gc.scm15
1 files changed, 4 insertions, 11 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 12d80fd171..3d918923f8 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -87,13 +87,9 @@ interpreted."
("TB" (expt 10 12))
("" 1)
(_
- (format (current-error-port) (_ "error: unknown unit: ~a~%")
- unit)
+ (leave (_ "error: unknown unit: ~a~%") unit)
(exit 1))))
- (begin
- (format (current-error-port)
- (_ "error: invalid number: ~a") numstr)
- (exit 1)))))
+ (leave (_ "error: invalid number: ~a") numstr))))
(define %options
;; Specification of the command-line options.
@@ -114,11 +110,8 @@ interpreted."
(let ((amount (size->number arg)))
(if arg
(alist-cons 'min-freed amount result)
- (begin
- (format (current-error-port)
- (_ "error: invalid amount of storage: ~a~%")
- arg)
- (exit 1)))))
+ (leave (_ "error: invalid amount of storage: ~a~%")
+ arg))))
(#f result)))))
(option '(#\d "delete") #f #f
(lambda (opt name arg result)