Skip to content

Commit 6059156

Browse files
committed
Merge #307: fix: fixes tests on windows
c10f5a6 fix: fixes tests on windows (stringhandler) Pull request description: `cargo test` is currently broken on Windows. This should fix it. ACKs for top commit: delta1: ACK c10f5a6; tested locally on linux Tree-SHA512: c6d75fdf45c8d829415b965a3aacc58acddc6dda9cbee94b1241cab464a12a4b4c449d4769d06b57628a078a1463a2cdfc16cb88d36ff5c3dcd83b16b34c7f96
2 parents 3eed7a6 + c10f5a6 commit 6059156

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
148148
std::process::exit(1);
149149
});
150150

151-
let (context_path, alias) = if let Some((ctx_str, alias_str)) = left_side.split_once(':') {
151+
// Use the right most `:` because on Windows, there might be a drive letter, e.g. C:\
152+
let (context_path, alias) = if let Some((ctx_str, alias_str)) = left_side.rsplit_once(':') {
152153
// Specific context provided (e.g., merkle:base_math=...)
153154
// We convert it to PathBuf so it shares the same type as main_path
154155
let canon_path = CanonPath::canonicalize(Path::new(ctx_str))?;

0 commit comments

Comments
 (0)