From d08c394f682a42583f09cd2f09d710bbf4ded6b1 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Sun, 7 Sep 2025 22:14:29 -0700 Subject: [PATCH] Use the correct binary path for cline-core (#6065) Binaries will be the cwd. When tools fail with an error, log the exception to the console. This makes debugging cline-core easier. # Conflicts: # src/services/ripgrep/index.ts # src/standalone/cline-core.ts --- src/core/task/ToolExecutor.ts | 1 + src/services/ripgrep/index.ts | 2 +- src/standalone/cline-core.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/task/ToolExecutor.ts b/src/core/task/ToolExecutor.ts index b3ca806aaf..c581e1ccb6 100644 --- a/src/core/task/ToolExecutor.ts +++ b/src/core/task/ToolExecutor.ts @@ -247,6 +247,7 @@ export class ToolExecutor { * Handles errors during tool execution */ private async handleError(action: string, error: Error, block: ToolUse): Promise { + console.log(error) const errorString = `Error ${action}: ${error.message}` await this.say("error", errorString) diff --git a/src/services/ripgrep/index.ts b/src/services/ripgrep/index.ts index 014c3aa88e..de27597a18 100644 --- a/src/services/ripgrep/index.ts +++ b/src/services/ripgrep/index.ts @@ -111,7 +111,7 @@ export async function regexSearchFiles( try { output = await execRipgrep(args) } catch (error) { - throw Error("Error calling ripgrep", error) + throw Error("Error calling ripgrep", { cause: error }) } const results: SearchResult[] = [] let currentResult: Partial | null = null diff --git a/src/standalone/cline-core.ts b/src/standalone/cline-core.ts index 8665815d8c..079369e799 100644 --- a/src/standalone/cline-core.ts +++ b/src/standalone/cline-core.ts @@ -45,7 +45,7 @@ function setupHostProvider() { const getCallbackUri = (): Promise => { return AuthHandler.getInstance().getCallbackUri() } - const getBinaryLocation = async (name: string): Promise => path.join(".", name) + const getBinaryLocation = async (name: string): Promise => path.join(process.cwd(), name) HostProvider.initialize( createWebview,