From efb107e0cd34fa0ed656441bf6e2414253c0344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 8 Mar 2016 11:48:21 +0100 Subject: packages: Gracefully report packages not found. Fixes a thinko introduced in 1b846da8c372bee78851439fd9e72b2499115e5a that would lead to a backtrace when looking for an unknown package. * gnu/packages.scm (%find-package): Correct logic when checking for FALLBACK?. --- tests/packages.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/packages.scm') diff --git a/tests/packages.scm b/tests/packages.scm index 9a2dbee35a..823ede1f25 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -788,6 +788,15 @@ (guix-package "-p" (derivation->output-path prof) "--search-paths")))))) +(test-equal "specification->package when not found" + 'quit + (catch 'quit + (lambda () + ;; This should call 'leave', producing an error message. + (specification->package "this-package-does-not-exist")) + (lambda (key . args) + key))) + (test-end "packages") -- cgit v1.2.3