Commit 3c85add
authored
fix: handle Windows path stripping failures gracefully (#93)
## Summary
- Fix Windows path handling that caused "Invalid relative path" errors
- On Windows, path stripping may fail due to case sensitivity or path format differences
- Instead of failing with an error, treat such paths as outside the workspace (like other unmatched paths)
## Problem
When running vite-task on Windows, paths tracked by fspy might have different formats or casing than the workspace root. This caused errors like:
```
Invalid relative path 'D:\a\vite-plus\vite-plus\ecosystem-ci\tanstack-start-helloworld': path is not relative
```
## Solution
Changed the error handling to use `.ok()` instead of `.map_err()` followed by `.transpose()?`, treating conversion failures as paths outside the workspace.
## Test plan
- [x] Ran `cargo test -p vite_task` locally
- Testing in vite-plus E2E CI
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 14167c2 commit 3c85add
1 file changed
+9
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
188 | 186 | | |
189 | 187 | | |
190 | 188 | | |
| |||
0 commit comments