Releases: kompre/quarto_batch_convert
Releases · kompre/quarto_batch_convert
v2025.9.2
fix: exit gracefully when no files found
Summary
Changes CLI behavior to exit with code 0 instead of 1 when no files are found to process. This treats "no work to do" as a valid state rather than an error condition.
Changes
-
quarto_batch_convert.py (lines 301-303, 321-326)
- Replace
ctx.exit(1)withreturnfor graceful exit - Remove "Error:" prefix from messages
- Replace
-
test_quarto_batch_convert.py (test_no_match_found)
- Update to expect exit code 0 instead of 1
- Update docstring to reflect graceful behavior
Rationale
- No files to process is not an error - it's a valid state where there's no work to do
- Prevents failure of CI/CD pipelines and automated scripts when no matching files exist
- Consistent with Unix tools (grep, find) that exit 0 on no matches
Testing
✅ All 17 tests pass
test_no_match_foundnow validates exit code 0- All other tests remain passing
Test Scenarios Covered
- Empty directory with
-rflag - Directory with files but wrong extension
- Regex pattern that matches no files
- Non-existent glob pattern
All scenarios now exit with code 0 and informative (non-error) message.
🤖 Generated with Claude Code
Installation
pipx install quarto-batch-convert