From 64251ef27cf97f94adcf9603c1354eec6de9f0fc Mon Sep 17 00:00:00 2001 From: Ray Fang Date: Thu, 28 May 2026 11:52:00 +0800 Subject: [PATCH] Add lookup path for @vscode/ripgrep-universal VS Code 1.122 moved the bundled ripgrep binary from @vscode/ripgrep to @vscode/ripgrep-universal with platform-specific subdirectories (e.g. bin/darwin-arm64/rg). Also fix the setting name in the error message to match the actual configuration key. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/config.js | 8 ++++++++ src/extension.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index ca49faa8..71298f43 100644 --- a/src/config.js +++ b/src/config.js @@ -109,6 +109,14 @@ function ripgrepPath() rgPath = exePathIsDefined( path.join( vscode.env.appRoot, "node_modules.asar.unpacked/@vscode/ripgrep/bin/", exeName() ) ); if( rgPath ) return rgPath; + var platformArch = process.platform + "-" + process.arch; + + rgPath = exePathIsDefined( path.join( vscode.env.appRoot, "node_modules/@vscode/ripgrep-universal/bin/", platformArch, exeName() ) ); + if( rgPath ) return rgPath; + + rgPath = exePathIsDefined( path.join( vscode.env.appRoot, "node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/", platformArch, exeName() ) ); + if( rgPath ) return rgPath; + return rgPath; } diff --git a/src/extension.js b/src/extension.js index 5c7bf02a..f0a35602 100644 --- a/src/extension.js +++ b/src/extension.js @@ -1260,7 +1260,7 @@ function activate( context ) // We can't do anything if we can't find ripgrep if( !config.ripgrepPath() ) { - vscode.window.showErrorMessage( "Todo-Tree: Failed to find vscode-ripgrep - please install ripgrep manually and set 'todo-tree.ripgrep' to point to the executable" ); + vscode.window.showErrorMessage( "Todo-Tree: Failed to find vscode-ripgrep - please install ripgrep manually and set 'todo-tree.ripgrep.ripgrep' to point to the executable" ); return; }