From d66f0e5789e392e8203e91239bdcda3662d6902f Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Thu, 18 Sep 2025 00:43:06 +0200 Subject: [PATCH] chore: fix typescript errors --- apps/cli/src/commands/set-status.command.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/cli/src/commands/set-status.command.ts b/apps/cli/src/commands/set-status.command.ts index 5eccdab8..dbf35329 100644 --- a/apps/cli/src/commands/set-status.command.ts +++ b/apps/cli/src/commands/set-status.command.ts @@ -136,14 +136,22 @@ export class SetStatusCommand extends Command { newStatus: result.newStatus }); } catch (error) { + const errorMessage = + error instanceof Error ? error.message : String(error); + if (!options.silent) { console.error( - chalk.red(`Failed to update task ${taskId}: ${error.message}`) + chalk.red(`Failed to update task ${taskId}: ${errorMessage}`) ); } if (options.format === 'json') { console.log( - JSON.stringify({ success: false, error: error.message, taskId }) + JSON.stringify({ + success: false, + error: errorMessage, + taskId, + timestamp: new Date().toISOString() + }) ); } process.exit(1); @@ -266,7 +274,8 @@ export class SetStatusCommand extends Command { deferred: chalk.gray, cancelled: chalk.red, blocked: chalk.red, - review: chalk.magenta + review: chalk.magenta, + completed: chalk.green }; const colorFn = statusColors[status] || chalk.white;