diff --git a/Cargo.lock b/Cargo.lock index 08f333269..8d6182c3d 100644 Binary files a/Cargo.lock and b/Cargo.lock differ diff --git a/Cargo.toml b/Cargo.toml index d0ff77a08..1c95c66a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,7 @@ libloading = "0.8.5" log = { version = "0.4.22", features = ["std"] } memchr = "2.7.4" once_cell = "1.19.0" +path-slash = "0.2.1" pretty_assertions = "1.4.1" rand = "0.8.5" regex = "1.10.6" diff --git a/cli/loader/Cargo.toml b/cli/loader/Cargo.toml index 5179b36d6..0c4df0af8 100644 --- a/cli/loader/Cargo.toml +++ b/cli/loader/Cargo.toml @@ -26,6 +26,7 @@ fs4.workspace = true indoc.workspace = true libloading.workspace = true once_cell.workspace = true +path-slash.workspace = true regex.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/cli/loader/src/lib.rs b/cli/loader/src/lib.rs index 610d0602a..9ecd716c9 100644 --- a/cli/loader/src/lib.rs +++ b/cli/loader/src/lib.rs @@ -23,6 +23,7 @@ use fs4::FileExt; use indoc::indoc; use libloading::{Library, Symbol}; use once_cell::unsync::OnceCell; +use path_slash::PathBufExt as _; use regex::{Regex, RegexBuilder}; use serde::{Deserialize, Deserializer, Serialize}; use tree_sitter::Language; @@ -823,7 +824,7 @@ impl Loader { path.push(src_path.strip_prefix(root_path).unwrap()); path }; - command.args(["--workdir", &workdir.to_string_lossy()]); + command.args(["--workdir", &workdir.to_slash_lossy()]); // Mount the root directory as a volume, which is the repo root let mut volume_string = OsString::from(&root_path);