|
|
Enhanced root directory validation with several improvements:
1. **Better Error Messages**: More descriptive error messages with specific
guidance on how to resolve issues (create directory, check permissions, etc.)
2. **Path Canonicalization**: Resolve symlinks and relative paths to absolute
canonical paths, ensuring consistent behavior across different path formats
3. **Write Permission Validation**: Proactively check write permissions by
creating a temporary test file before attempting daemon operations
4. **Comprehensive Edge Case Handling**:
- Broken symlinks are properly detected as non-existent
- Regular symlinks to directories are resolved correctly
- Symlinks to files are rejected appropriately
- Deep nested non-existent paths are handled gracefully
5. **Enhanced Git Root Handling**: Better error messages for git repository
detection failures and .demon directory creation issues
6. **Robust Testing**: Added comprehensive test suite covering:
- All edge cases and error conditions
- Improved error message validation
- Write permission validation
- Path canonicalization behavior
- Symlink handling (valid, broken, to files, to directories)
The validation now provides clear, actionable feedback to users when
directory issues are encountered, making the tool more user-friendly
and robust in various deployment scenarios.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
|