From 38718e9d4b91bd30c8314952b24a4b8a592fbfd9 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Mon, 4 May 2026 21:25:43 -0400 Subject: [PATCH] fix: avoid unsafe Promise cast in execRaw --- sdk/src/gsd-tools.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/src/gsd-tools.ts b/sdk/src/gsd-tools.ts index 169cf948c..a6fdbbd90 100644 --- a/sdk/src/gsd-tools.ts +++ b/sdk/src/gsd-tools.ts @@ -150,7 +150,10 @@ export class GSDTools { * Use for commands like `config-set` that return plain text, not JSON. */ async execRaw(command: string, args: string[] = []): Promise { - return this.executeWithToolsError(command, args, async () => this.commandExecutor.exec(command, args, 'raw') as string); + return this.executeWithToolsError(command, args, async () => { + const out = await this.commandExecutor.exec(command, args, 'raw'); + return typeof out === 'string' ? out : String(out ?? ''); + }); }