Function
runUpgradeAction
(action: () => Promise<void>)
Source from the content-addressed store, hash-verified
| 85 | } |
| 86 | |
| 87 | const runUpgradeAction = async (action: () => Promise<void>) => { |
| 88 | try { |
| 89 | await action() |
| 90 | process.exit(0) |
| 91 | } catch (error) { |
| 92 | const message = error instanceof Error ? error.message : String(error) |
| 93 | console.error(`[CLI] Error: ${message}`) |
| 94 | process.exit(1) |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | applyListOptions(listCommand.command("commands").description("List available slash commands")).action( |
| 99 | async (options: Parameters<typeof listCommands>[0]) => { |
Tested by
no test coverage detected