Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/scripts/nbin-shim.js

15 lines
393 B
JavaScript
Raw Normal View History

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