From 48cb3699170f4839affdca23f0e7bd4abea532cd Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 15 Oct 2026 02:35:03 +0200 Subject: [PATCH] lib/tests/strings.sh: don't pin the exact error wording The test asserted the exact stderr of `nix-instantiate` when coercing a missing path. That wording is implementation-defined and subject to change: it differs between CppNix and Lix, and it can change between CppNix releases too. Only check that evaluation fails and that the error names the missing path. --- lib/tests/strings.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tests/strings.sh b/lib/tests/strings.sh index da7eca32bfb6..f23a60735900 100755 --- a/lib/tests/strings.sh +++ b/lib/tests/strings.sh @@ -54,7 +54,9 @@ expectFailure() { fi } -expectFailure 'escapeShellArg /does-not-exist' "error: path '/does-not-exist' does not exist" +# The exact wording is implementation-defined, so only check that the error +# names the missing path. +expectFailure 'escapeShellArg /does-not-exist' "error:.*/does-not-exist" # Without this, there would be no need to escape the path. export NIX_STORE_DIR="$work/store with spaces"