Skip to content

Commit d81fb8b

Browse files
mikolalysenkoclaude
andcommitted
fix(windows): maven package_path mixed OS separator into the reported rel
jar_path was built as leaf_dir.join(&jar_leaf), which inserts an OS separator (`\` on Windows) before the leaf while the rest of the reported path keeps the rel's forward slashes — package_path is reported (and asserted) as a display string, so wired_rebuild_reports_vendored_jar_path failed on windows-latest. Join the already-present full forward-slash rel (jar_copy_rel) off project_root instead; same file, consistent report on every platform. First-ever windows execution of this test: cargo runs test binaries as they finish compiling, and every earlier windows run died in some other binary first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent cea6084 commit d81fb8b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crates/socket-patch-core/src/patch/vendor/maven_repo.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ pub async fn vendor_maven(
176176
let jar_copy_rel = format!("{leaf_rel}/{jar_leaf}");
177177
let uuid_dir = project_root.join(&uuid_dir_rel);
178178
let leaf_dir = project_root.join(&leaf_rel);
179-
let jar_path = leaf_dir.join(&jar_leaf);
179+
// Join the full forward-slash rel rather than `leaf_dir.join(&jar_leaf)`:
180+
// the joined form puts an OS separator (`\` on Windows) before the leaf
181+
// while every other reported path keeps the rel's forward slashes —
182+
// `package_path` reports (and tests compare) this as a display string.
183+
let jar_path = project_root.join(&jar_copy_rel);
180184
let repo_id = format!("socket-patch-vendor-{}", record.uuid);
181185

182186
// A patch with no files is meaningless to vendor: no-op success, no edits.

0 commit comments

Comments
 (0)