Skip to content

Commit ac6cd9c

Browse files
committed
Fix SIGPIPE in test-templates-comprehensive.sh
Same echo-pipe-grep pattern replaced with here-string to avoid broken pipe under pipefail.
1 parent 437f188 commit ac6cd9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test-templates-comprehensive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ while IFS= read -r -d '' template_file; do
151151
for pattern in $unclosed; do
152152
# Extract the variable name part
153153
varname=$(echo "$pattern" | sed 's/{{//' | sed 's/[^A-Z0-9_].*//')
154-
if [[ -n "$varname" ]] && ! echo "$content" | grep -q "{{${varname}}}"; then
154+
if [[ -n "$varname" ]] && ! grep -q "{{${varname}}}" <<< "$content"; then
155155
syntax_errors="${syntax_errors}Possibly unclosed: {{$varname\n"
156156
fi
157157
done

0 commit comments

Comments
 (0)