diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-07 23:10:02 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-07 23:32:01 +0100 |
commit | fba607b12919b254d75b1e7e9223d712fe2ac32c (patch) | |
tree | 6f088e9a0262c2384fc6769fdfa69b717e5f6246 | |
parent | e3cc793e7c5a71189564f11ce825735b008871b6 (diff) | |
download | guix-fba607b12919b254d75b1e7e9223d712fe2ac32c.tar.gz |
refresh: Bail out when asked for a nonexistent updater.
* guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find' returns #f.
-rw-r--r-- | guix/scripts/refresh.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index a94bb22a91..2341ae6777 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -197,9 +197,10 @@ unavailable optional dependencies such as Guile-JSON." (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." |