From 9a38bed2cf32e9462badfa43e74cdd4580e804fc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 22 Feb 2021 10:52:21 +0100 Subject: packages: 'package-field-location' handles 'search-path' returning #f. Fixes . Reported by zimoun . This is similar to the fix in d10474c38d58bdc676e64336769dc2e00cdfa8ed. * guix/packages.scm (package-field-location): Handle FILE not in %LOAD-PATH. * tests/guix-lint.sh: Add test. --- tests/guix-lint.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh index fdf548fbf1..97c2ea83fe 100644 --- a/tests/guix-lint.sh +++ b/tests/guix-lint.sh @@ -90,3 +90,8 @@ guix lint -L $module_dir -c inputs-should-be-native dummy dummy@42 dummy # that it does find it anyway. See . (cd "$module_dir"/.. ; guix lint -c formatting -L "$(basename "$module_dir")" dummy@42) 2>&1 > "$module_dir/out" test -z "$(cat "$module_dir/out")" + +# Likewise, when there's a warning, 'package-field-location' used to crash +# because it can't find "t-xyz/foo.scm". See . +(cd "$module_dir"/.. ; guix lint -c synopsis -L "$(basename "$module_dir")" dummy@42) 2>&1 > "$module_dir/out" +grep_warning "`cat "$module_dir/out"`" -- cgit v1.2.3