1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-16 23:30:29 +02:00

guix package: '-l' correctly handles zero-generation profiles.

* guix/scripts/package.scm (process-query) <'list-generations>: Properly
handle the case where 'profile-generations' returns the empty list.
This commit is contained in:
Ludovic Courtès
2017-07-20 15:27:54 +02:00
parent edbe07cd67
commit 561f4e4500

View File

@@ -713,9 +713,12 @@ processed, #f otherwise."
(raise (condition (&profile-not-found-error
(profile profile)))))
((string-null? pattern)
(list-generation display-profile-content
(car (profile-generations profile)))
(diff-profiles profile (profile-generations profile)))
(match (profile-generations profile)
(()
#t)
((first rest ...)
(list-generation display-profile-content first)
(diff-profiles profile (cons first rest)))))
((matching-generations pattern profile)
=>
(lambda (numbers)