Skip to content
Snippets Groups Projects
Commit fba607b1 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

refresh: Bail out when asked for a nonexistent updater.

* guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find'
returns #f.
parent e3cc793e
No related branches found
No related tags found
No related merge requests found
...@@ -197,9 +197,10 @@ (define %updaters ...@@ -197,9 +197,10 @@ (define %updaters
(define (lookup-updater name) (define (lookup-updater name)
"Return the updater called NAME." "Return the updater called NAME."
(find (lambda (updater) (or (find (lambda (updater)
(eq? name (upstream-updater-name updater))) (eq? name (upstream-updater-name updater)))
%updaters)) %updaters)
(leave (_ "~a: no such updater~%") name)))
(define (list-updaters-and-exit) (define (list-updaters-and-exit)
"Display available updaters and exit." "Display available updaters and exit."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment