fix: Windows platform compatibility#111
Open
FirstCastSolutions423 wants to merge 2 commits intoldayton:mainfrom
Open
fix: Windows platform compatibility#111FirstCastSolutions423 wants to merge 2 commits intoldayton:mainfrom
FirstCastSolutions423 wants to merge 2 commits intoldayton:mainfrom
Conversation
Normalize all paths to forward slashes for consistent glob matching across platforms. Detect Windows drive-letter paths (C:\...) as absolute. Fix statusline Unicode encoding on Windows (cp1252 → UTF-8). Update tests to use sys.executable instead of hardcoded /usr/bin/python3, skip symlink tests on Windows, and handle USERPROFILE for tilde expansion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
Thanks for the contribution! Windows support is appreciated. A few things to flag — this touches the path normalization in the rule matching engine, which is security-critical code, so it warrants extra caution:
The core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 20 test failures on Windows and resolves runtime path-matching bugs affecting Windows users.
Changes
src/dippy/core/config.py— Cross-platform path normalization_posix_str()to normalize backslashes to forward slashes for consistent fnmatch matchingC:\...) in_classify_token()src/dippy/dippy_statusline.py— Windows compatibilitysys.stdout.reconfigure(encoding="utf-8")to handle emoji output on Windows (cp1252 default)_refresh_mcp_cache_python()— pure Python replacement for theawk|paste|sedpipeline on Windowssys.platformchecktests/test_statusline.py,tests/test_entrypoint.py/usr/bin/python3withsys.executableSeCreateSymbolicLinkprivilege)tests/test_config.pyUSERPROFILE(not justHOME) for tilde expansion on WindowsTest Results