mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
fix(wasm): use / paths for workdir
Reimplemented the fix from #2183 to fix building WASM files with Docker
on Windows again. The --workdir argument gives a path inside the Docker
container, so it must use forward slashes regardless of the default path
separator on the host OS.
(cherry picked from commit 755e49e212)
This commit is contained in:
parent
3492bee2f7
commit
3ad82e6772
BIN
Cargo.lock
generated
BIN
Cargo.lock
generated
Binary file not shown.
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue