feat(loader): respect NM env var

This commit is contained in:
ObserverOfTime 2025-09-20 17:42:09 +03:00 committed by Amaan Qureshi
parent 79ef484392
commit 6dfa79013f
2 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,6 @@
use std::{
collections::HashSet,
env,
io::BufRead,
path::PathBuf,
process::{Command, Stdio},
@ -94,7 +95,8 @@ fn check_wasm_exports() -> Result<()> {
}),
);
let nm_child = Command::new("nm")
let nm_cmd = env::var("NM").unwrap_or_else(|_| "nm".to_owned());
let nm_child = Command::new(nm_cmd)
.arg("-W")
.arg("-U")
.arg("libtree-sitter.so")