Skip to content

Commit 5fffc73

Browse files
committed
Compare hot-patch manifest paths as paths
passes() builds each pass's manifest path with Path::join, which writes the platform's separator. The test compared the result to a /-joined string, so it failed on Windows and kept the scheduled main run red. Compare the two as paths instead: a / in a literal is a separator on every platform, so the expectation stays readable and holds on Windows too. Fixes #2080 Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aePVwfWQikf61EL6Ec7
1 parent ace90fd commit 5fffc73

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎crates/socket-patch-cli/src/hot_patch.rs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,22 @@ mod tests {
619619
};
620620
assert!(!project.common.global);
621621
assert_eq!(project.paths, ["packages/*"]);
622-
assert_eq!(project.common.manifest_path, "/state/project/manifest.json");
622+
// Compared as paths: the separator `Path::join` writes is the
623+
// platform's, and a `/` in a literal is one on every platform.
624+
assert_eq!(
625+
Path::new(&project.common.manifest_path),
626+
Path::new("/state/project/manifest.json")
627+
);
623628
// Go is the global pass's: a project run would rewrite `go.mod`.
624629
assert!(!ecosystems(project).contains(&"golang"));
625630
assert!(ecosystems(project).contains(&"npm"));
626631
assert!(global.common.global);
627632
assert!(global.paths.is_empty());
628633
assert_eq!(global.common.ecosystems, None);
629-
assert_eq!(global.common.manifest_path, "/state/global/manifest.json");
634+
assert_eq!(
635+
Path::new(&global.common.manifest_path),
636+
Path::new("/state/global/manifest.json")
637+
);
630638
}
631639

632640
#[test]

0 commit comments

Comments
 (0)