2019-07-31 02:20:03 +03:00
|
|
|
// This file is prepended to loader/entry code (like our main.js or VS Code's
|
|
|
|
// bootstrap-fork.js). {{ROOT_PATH}} is replaced during the build process.
|
2019-07-05 19:54:04 +03:00
|
|
|
if (!global.NBIN_LOADED) {
|
|
|
|
try {
|
|
|
|
const nbin = require("nbin");
|
|
|
|
nbin.shimNativeFs("{{ROOT_PATH}}");
|
|
|
|
global.NBIN_LOADED = true;
|
2019-07-17 03:26:05 +03:00
|
|
|
const path = require("path");
|
|
|
|
const rg = require("vscode-ripgrep");
|
|
|
|
rg.binaryRgPath = rg.rgPath;
|
|
|
|
rg.rgPath = path.join(
|
|
|
|
require("os").tmpdir(),
|
2019-07-20 01:43:54 +03:00
|
|
|
`code-server/${path.basename(rg.binaryRgPath)}`
|
2019-07-17 03:26:05 +03:00
|
|
|
);
|
2019-07-20 01:43:54 +03:00
|
|
|
} catch (error) { /* Not in the binary. */ }
|
2019-07-05 19:54:04 +03:00
|
|
|
}
|