guix home, system: Use 'leave' to report missing generations.

Fixes <https://issues.guix.gnu.org/50982>.
Reported by Xinglu Chen <public@yoctocell.xyz>.

Fixes a typo ('error' instead of 'leave') introduced in
158032bd7d and copied in
89e05a6955.

* guix/scripts/system.scm (process-command): Use 'leave', not 'error'.
* guix/scripts/home.scm (process-command): Likewise.
This commit is contained in:
Ludovic Courtès 2022-01-06 11:25:42 +01:00
parent 9f526f5dad
commit a9268216e4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 2 additions and 2 deletions

View file

@ -286,7 +286,7 @@ (define-syntax-rule (with-store* store exp ...)
((describe)
(match (generation-number %guix-home)
(0
(error (G_ "no home environment generation, nothing to describe~%")))
(leave (G_ "no home environment generation, nothing to describe~%")))
(generation
(display-home-environment-generation generation))))
((list-generations)

View file

@ -1321,7 +1321,7 @@ (define-syntax-rule (with-store* store exp ...)
((describe)
(match (generation-number %system-profile)
(0
(error (G_ "no system generation, nothing to describe~%")))
(leave (G_ "no system generation, nothing to describe~%")))
(generation
(display-system-generation generation))))
((search)