mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 05:52:21 +03:00
Allow passing extra args to node in test runner
This can be useful for enabling experimental features
This commit is contained in:
parent
7ea3ee60b7
commit
7eb49acf0d
@ -92,9 +92,16 @@ pub fn execute(
|
||||
let mut path = env::split_paths(&path).collect::<Vec<_>>();
|
||||
path.push(env::current_dir().unwrap());
|
||||
path.push(tmpdir.to_path_buf());
|
||||
let extra_node_args = env::var("NODE_ARGS")
|
||||
.unwrap_or_default()
|
||||
.split(",")
|
||||
.map(|s| s.to_string())
|
||||
.filter(|s| !s.is_empty())
|
||||
.collect::<Vec<_>>();
|
||||
exec(
|
||||
Command::new("node")
|
||||
.env("NODE_PATH", env::join_paths(&path).unwrap())
|
||||
.args(&extra_node_args)
|
||||
.arg(&js_path)
|
||||
.args(args),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user