From 652163154c06b47936a453f44ea35938789718de Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 11 Nov 2018 17:13:20 +0100 Subject: guix package: '--show' errors when asked for a non-existent package. Fixes . Reported by swedebugia . * guix/scripts/package.scm (process-query): Call 'leave' when 'find-packages-by-name' returns the empty list. * tests/guix-package.sh: Test it. --- tests/guix-package.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/guix-package.sh b/tests/guix-package.sh index f7dfbfad00..7eeb4304d1 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -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 -- cgit v1.2.3