Skip to content

Actually adding Windows support#55

Merged
simonc merged 6 commits intomainfrom
windows-support
Feb 3, 2026
Merged

Actually adding Windows support#55
simonc merged 6 commits intomainfrom
windows-support

Conversation

@simonc
Copy link
Owner

@simonc simonc commented Feb 3, 2026

No description provided.

simonc and others added 5 commits February 3, 2026 13:25
On Windows, File.basename('D:/') returns '/' which caused
Directory#find to fail when stripping the root prefix from paths.
Now root directories preserve their full normalized path (e.g., 'D:/')
as their name, ensuring path.start_with?(name) works correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Normalize glob patterns before matching so '/test' matches 'D:/test'
- Fix chroot to use platform_root instead of hardcoded '/'
- Fix Directory#find to strip platform root for non-root directories
- Update test expectations to use expected_path() for cross-platform support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Directory#find: strip platform_root first before checking directory name
- mktmpdir: normalize the tmpdir argument and returned path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
On Windows, paths like 'D:foo' (without slash after colon) are
drive-relative paths. Ruby's File.dirname returns 'D:.' for these,
which the fake filesystem couldn't handle.

This fix converts:
- 'D:' (bare drive) → 'D:/'
- 'D:foo' or 'D:.' → 'D:/foo' or 'D:/.'

This resolves failures in FileUtils.install tests on Ruby 3.3+ Windows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@simonc simonc merged commit 3666a4e into main Feb 3, 2026
9 checks passed
@simonc simonc deleted the windows-support branch February 3, 2026 13:18
simonc added a commit that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant