MCPcopy Create free account
hub / github.com/agent-tower/core / getCommandOutput

Function getCommandOutput

packages/server/src/cli.ts:130–134  ·  view source on GitHub ↗
(error: unknown, key: 'stdout' | 'stderr')

Source from the content-addressed store, hash-verified

128}
129
130function getCommandOutput(error: unknown, key: 'stdout' | 'stderr'): string {
131 const output = (error as Partial<SpawnSyncReturns<Buffer>> | null)?.[key];
132 if (!output) return '';
133 return Buffer.isBuffer(output) ? output.toString('utf-8').trim() : String(output).trim();
134}
135
136/** 确保数据库 schema 与当前版本一致 */
137function ensureDatabase(dataDir: string, dbPath: string, schemaPath: string) {

Callers 1

ensureDatabaseFunction · 0.85

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected