Project
vgrep
Description
In commands.rs run_index function, Database::new(&config.db_path()?) is called without checking if the parent directory exists or if the user has write permissions. This can lead to confusing errors.
Error Message
Debug Logs
System Information
OS: Any
Rust Version: 1.75+
Screenshots
No response
Steps to Reproduce
- Configure vgrep with a db_path in a non-existent directory
- Run
vgrep index
- Observe error
Expected Behavior
Clear error message about directory not existing, or automatic directory creation
Actual Behavior
SQLite error about being unable to open database
Additional Context
No response