stdenv: substituteStream: escape echoed pattern in --replace mismatch warning

This commit is contained in:
Peder Bergebakken Sundt 2023-11-22 19:48:45 +01:00
parent e07a2fab7f
commit 4c1b74bac7

View File

@ -852,10 +852,10 @@ substituteStream() {
if [ "${!var}" == "$savedvar" ]; then
if [ -z "$is_required" ]; then
if [ -z "$is_quiet" ]; then
echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" >&2
printf "substituteStream(): WARNING: pattern %q doesn't match anything in %s\n" "$pattern" "$description" >&2
fi
else
echo "substituteStream(): ERROR: pattern '$pattern' doesn't match anything in $description" >&2
printf "substituteStream(): ERROR: pattern %q doesn't match anything in %s\n" "$pattern" "$description" >&2
return 1
fi
fi