Skip to content

Commit db9f134

Browse files
committed
docs: document the checkPath helper in getBinPath
1 parent 838fb91 commit db9f134

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/services/ripgrep/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ export const bundledRgPath = path.join(__dirname, "bin", `${process.platform}-${
103103
* (e.g. VS Code Insiders' staged-install layout, see microsoft/vscode#252063).
104104
*/
105105
export async function getBinPath(vscodeAppRoot: string): Promise<string | undefined> {
106+
/**
107+
* Resolve `<pkgFolder>/<binName>` under the VS Code application root,
108+
* returning the absolute path when the ripgrep binary exists there.
109+
*/
106110
const checkPath = async (pkgFolder: string) => {
107111
const fullPath = path.join(vscodeAppRoot, pkgFolder, binName)
108112
return (await fileExistsAtPath(fullPath)) ? fullPath : undefined

0 commit comments

Comments
 (0)