How to use the vscode-ripgrep.binaryRgPath function in vscode-ripgrep

To help you get started, we’ve selected a few vscode-ripgrep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cdr / code-server / scripts / nbin-shim.js View on Github external
// 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.
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. */ }
}

vscode-ripgrep

A module for using ripgrep in a Node project

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages