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 ?? ''); + }); }