summaryrefslogtreecommitdiff
path: root/guix/scripts/describe.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-18 22:49:41 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-18 23:23:44 +0200
commit912adda316886cef5f3f870e53d607bf8d02222f (patch)
tree0ba99a83aff60a35aace510ad433d6960541c61b /guix/scripts/describe.scm
parentcda08dd339112c78881e91597326498331b16dca (diff)
describe: Work correctly on generation-less profiles.
Previously a command like: $(readlink -f ~/.config/guix/current)/bin/guix describe would succeed without printing anything. * guix/scripts/describe.scm (display-profile-info): Don't call 'generation-file-name' when NUMBER is zero. * guix/scripts/pull.scm (display-profile-content): Likewise.
Diffstat (limited to 'guix/scripts/describe.scm')
-rw-r--r--guix/scripts/describe.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index fdff07d0e3..c1a20fe26c 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -134,8 +134,10 @@ in the format specified by FMT."
;; Show most recently installed packages last.
(reverse
(manifest-entries
- (profile-manifest (generation-file-name profile
- number)))))))))
+ (profile-manifest
+ (if (zero? number)
+ profile
+ (generation-file-name profile number))))))))))
(display-package-search-path fmt))