mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-19 01:11:55 -05:00
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.
This commit is contained in:
parent
cda08dd339
commit
912adda316
2 changed files with 7 additions and 3 deletions
|
@ -134,8 +134,10 @@ (define number
|
|||
;; 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))
|
||||
|
||||
|
||||
|
|
|
@ -233,7 +233,9 @@ (define (display-profile-content profile number)
|
|||
;; 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)))))))
|
||||
|
||||
(define (indented-string str indent)
|
||||
"Return STR with each newline preceded by IDENT spaces."
|
||||
|
|
Loading…
Reference in a new issue