Skip to content

Commit f521fd8

Browse files
Frederikclaude
andcommitted
fix(tests): grep -c already outputs 0 on no match, || echo "0" duplicated it
The shellcheck test captured "0\n0" instead of "0" because grep -c outputs the count (0) even on exit code 1, then || echo "0" added a second zero. Changed to || true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Sw2Ti3a4Ad8U6JuAyNib1
1 parent d5df7e1 commit f521fd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test-nightshift.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ if command -v shellcheck &>/dev/null; then
290290
for script in config.sh coordinator.sh worker.sh summary.sh summary-morning.sh lesson-generator.sh install.sh; do
291291
TESTS_RUN=$((TESTS_RUN + 1))
292292
sc_output=$(shellcheck -S warning "$PROJECT_DIR/$script" 2>&1 || true)
293-
sc_errors=$(echo "$sc_output" | grep -c "^In " || echo "0")
293+
sc_errors=$(echo "$sc_output" | grep -c "^In " || true)
294294
if [[ "$sc_errors" -eq 0 ]]; then
295295
TESTS_PASSED=$((TESTS_PASSED + 1))
296296
echo -e " ${GREEN}PASS${NC} shellcheck: $script"

0 commit comments

Comments
 (0)