Use nbin in forked processes

This commit is contained in:
Asher
2019-07-05 11:54:04 -05:00
parent 6156eb9ff4
commit 3ca90a5f89
3 changed files with 24 additions and 10 deletions

9
scripts/nbin-loader.js Normal file
View File

@ -0,0 +1,9 @@
if (!global.NBIN_LOADED) {
try {
const nbin = require("nbin");
nbin.shimNativeFs("{{ROOT_PATH}}");
global.NBIN_LOADED = true;
} catch (error) {
console.log("Not in the binary");
}
}