Conversation
- Add -c/--config flag for custom config path - Add CLAWS_CONFIG env var support - Precedence: CLI flag > env var > default - Validate file exists before loading - Autosave writes to specified path
SetConfigPath now expands ~/path to full home directory path, allowing `claws -c ~/.my-config.yaml` to work as expected.
- expandTilde now returns error on UserHomeDir failure - use apperrors.Wrap instead of fmt.Errorf
This comment was marked as resolved.
This comment was marked as resolved.
PR Review: Custom Config File Path SupportSummaryThis PR adds support for custom config file paths via CLI flag ( ✅ Strengths
🐛 Potential IssuesCritical: Race Condition in Global StateLocation: The current implementation has a potential race condition. The mutex is unlocked before returning, but the value could change between Minor Issues
🔒 Security Considerations✅ No security issues identified:
⚡ Performance Considerations✅ No performance concerns:
🎯 Overall AssessmentVerdict: ✅ Approve with minor suggestions This is a well-implemented feature with good test coverage. The code is production-ready with the understanding that Recommendation: Merge after considering the |
Summary
-c, --configCLI flag for custom config pathCLAWS_CONFIGenv var supportChanges
SetConfigPath(),GetConfigPath(),expandTilde()in config/file.go~/) supportCloses #106