mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 21:49:34 -05: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:
parent
edbe07cd67
commit
561f4e4500
1 changed files with 6 additions and 3 deletions
|
@ -713,9 +713,12 @@ (define (diff-profiles profile numbers)
|
|||
(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)
|
||||
|
|
Loading…
Reference in a new issue