[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: guix package: '-l' correctly handles zero-generation profiles.
From: |
Ludovic Courtès |
Subject: |
03/03: guix package: '-l' correctly handles zero-generation profiles. |
Date: |
Thu, 20 Jul 2017 09:29:22 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 561f4e450078a06c707d3dcda2cf0e7d6eb5ebae
Author: Ludovic Courtès <address@hidden>
Date: Thu Jul 20 15:27:54 2017 +0200
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.
---
guix/scripts/package.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 96ee5c0..8da7a3f 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -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)