1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

guix package: '--show' errors when asked for a non-existent package.

Fixes <https://bugs.gnu.org/33323>.
Reported by swedebugia <swedebugia@riseup.net>.

* guix/scripts/package.scm (process-query): Call 'leave' when
'find-packages-by-name' returns the empty list.
* tests/guix-package.sh: Test it.
This commit is contained in:
Ludovic Courtès
2018-11-11 17:13:20 +01:00
parent 9c001c07d4
commit 652163154c
2 changed files with 11 additions and 3 deletions

View File

@@ -106,6 +106,10 @@ guix package --show=guile | grep "^name: guile"
# Ensure `--show' doesn't fail for packages with non-package inputs.
guix package --show=texlive
# Fail for non-existent packages or package/version pairs.
if guix package --show=does-not-exist; then false; else true; fi
if guix package --show=emacs@42; then false; else true; fi
# Search.
LC_MESSAGES=C
export LC_MESSAGES