2019-07-17 07:26:05 +07:00
|
|
|
/* global require, global, process, __dirname */
|
2019-07-05 23:54:04 +07:00
|
|
|
if (!global.NBIN_LOADED) {
|
|
|
|
try {
|
|
|
|
const nbin = require("nbin");
|
|
|
|
nbin.shimNativeFs("{{ROOT_PATH}}");
|
|
|
|
global.NBIN_LOADED = true;
|
2019-07-17 07:26:05 +07:00
|
|
|
|
|
|
|
const path = require("path");
|
|
|
|
const rg = require("vscode-ripgrep");
|
|
|
|
rg.binaryRgPath = rg.rgPath;
|
|
|
|
rg.rgPath = path.join(
|
|
|
|
require("os").tmpdir(),
|
|
|
|
`code-server/${path.basename(rg.binaryRgPath)}`,
|
|
|
|
);
|
2019-07-05 23:54:04 +07:00
|
|
|
} catch (error) {
|
2019-07-11 06:10:39 +07:00
|
|
|
// Not in the binary.
|
2019-07-05 23:54:04 +07:00
|
|
|
}
|
|
|
|
}
|