fix: avoid unsafe Promise cast in execRaw

This commit is contained in:
Tom Boucher
2026-05-04 21:25:43 -04:00
parent a441f96f37
commit 38718e9d4b

View File

@@ -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<string> {
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 ?? '');
});
}