refresh: Bail out when asked for a nonexistent updater.

* guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find'
returns #f.
This commit is contained in:
Ludovic Courtès 2015-12-07 23:10:02 +01:00
parent e3cc793e7c
commit fba607b129

View file

@ -197,9 +197,10 @@ (define %updaters
(define (lookup-updater name)
"Return the updater called NAME."
(find (lambda (updater)
(eq? name (upstream-updater-name updater)))
%updaters))
(or (find (lambda (updater)
(eq? name (upstream-updater-name updater)))
%updaters)
(leave (_ "~a: no such updater~%") name)))
(define (list-updaters-and-exit)
"Display available updaters and exit."