Avoid running entire napi_build::setup twice

This commit is contained in:
adumbidiot 2020-10-30 18:29:08 -07:00
parent e36e1e1fbb
commit 5364458366
2 changed files with 2 additions and 4 deletions

View file

@ -93,7 +93,7 @@ cfg_if! {
} }
} }
fn setup_napi_feature() { pub fn setup_napi_feature() {
let napi_version = String::from_utf8( let napi_version = String::from_utf8(
Command::new("node") Command::new("node")
.args(&["-e", "console.log(process.versions.napi)"]) .args(&["-e", "console.log(process.versions.napi)"])

View file

@ -1,5 +1,3 @@
extern crate napi_build;
fn main() { fn main() {
napi_build::setup(); napi_build::setup_napi_feature();
} }