Problem
When you run malwar scan /nonexistent/path, the error message is a Python traceback rather than a friendly CLI error. Users should see a clear message like:
Error: Path '/nonexistent/path' does not exist.
How to Fix
- Open
src/malwar/cli/app.py — the scan command handler
- Add a path existence check before the scan begins
- Use
typer.BadParameter or rich.console.print with [red] styling for a clean error
- Also handle the case where the path exists but contains no
.md files (currently says "No .md files found" which is good, but could suggest checking the path)
Testing
Add a test in tests/ that verifies:
- Scanning a nonexistent path gives a clear error message and exit code 1
- Scanning an empty directory gives a helpful message
Problem
When you run
malwar scan /nonexistent/path, the error message is a Python traceback rather than a friendly CLI error. Users should see a clear message like:How to Fix
src/malwar/cli/app.py— thescancommand handlertyper.BadParameterorrich.console.printwith[red]styling for a clean error.mdfiles (currently says "No .md files found" which is good, but could suggest checking the path)Testing
Add a test in
tests/that verifies: