Skip to content

Commit 644417e

Browse files
claudesjnims
authored andcommitted
style: standardize error suppression pattern in test-agent-trigger.sh
Standardize the error suppression pattern for grep -c operations to consistently use `2>/dev/null || echo 0`. Changed line 73 to match the pattern used on lines 171, 181, 191. This ensures consistent behavior when grep finds no matches (which returns exit code 1). Before: EXAMPLE_COUNT=$(... | grep -c '<example>' || echo 0) After: EXAMPLE_COUNT=$(... | grep -c '<example>' 2>/dev/null || echo 0)
1 parent 19468ec commit 644417e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/plugin-dev/skills/agent-development/scripts/test-agent-trigger.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if [ -z "$DESCRIPTION" ]; then
7070
fi
7171

7272
# Count example blocks
73-
EXAMPLE_COUNT=$(echo "$DESCRIPTION" | grep -c '<example>' || echo 0)
73+
EXAMPLE_COUNT=$(echo "$DESCRIPTION" | grep -c '<example>' 2>/dev/null || echo 0)
7474

7575
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
7676
echo "📊 EXAMPLE ANALYSIS"

0 commit comments

Comments
 (0)