[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50982: [PATCH] scripts: home/system: Don’t throw an error if no gene
From: |
Ludovic Courtès |
Subject: |
bug#50982: [PATCH] scripts: home/system: Don’t throw an error if no generations exist. |
Date: |
Thu, 06 Jan 2022 11:28:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Maxime Devos <maximedevos@telenet.be> skribis:
> Xinglu Chen schreef op za 02-10-2021 om 23:05 [+0200]:
>> Previously, When running ‘guix home describe’ or ‘guix system describe’ prior
>> to having any generations, a backtrace would produced. Since not having any
>> existing generations is not an error, a warning would be enough.
>>
>> $ guix system describe
>> guix system: warning: no system generation, nothing to describe
>
> Printing a warning instead of an error to avoid a backrace isn't necessary.
> E.g., "guix show i-do-not-exists" prints an error
> ‘guix show: error: i-do-not-exist: package not found’.
>
> I suggest using (leave (G_ "bla bla")) instead of (error (G_ "bla bla"))
> for these kind of errors, it appears to work '%find-package' in (gnu
> packages).
I’ve done that now, thanks!
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#50982: [PATCH] scripts: home/system: Don’t throw an error if no generations exist.,
Ludovic Courtès <=