mirror of
https://github.com/danog/code-server.git
synced 2024-12-14 10:17:19 +01:00
19 lines
443 B
JavaScript
19 lines
443 B
JavaScript
/* global require, global, process, __dirname */
|
|
if (!global.NBIN_LOADED) {
|
|
try {
|
|
const nbin = require("nbin");
|
|
nbin.shimNativeFs("{{ROOT_PATH}}");
|
|
global.NBIN_LOADED = true;
|
|
|
|
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)}`,
|
|
);
|
|
} catch (error) {
|
|
// Not in the binary.
|
|
}
|
|
}
|