| 368 | } |
| 369 | |
| 370 | async function runComposeCommand(args: string[], label: string): Promise<boolean> { |
| 371 | return new Promise<boolean>((resolve) => { |
| 372 | const child = spawn('docker', ['compose', ...args], { stdio: ['ignore', 'ignore', 'pipe'] }); |
| 373 | let err = ''; |
| 374 | child.stderr?.on('data', (chunk: Buffer) => { |
| 375 | err += chunk.toString(); |
| 376 | }); |
| 377 | child.on('exit', (code) => { |
| 378 | if (code !== 0 && err.trim()) { |
| 379 | console.error(chalk.red('✗ ') + `${label}: ` + err.trim()); |
| 380 | } |
| 381 | resolve(code === 0); |
| 382 | }); |
| 383 | child.on('error', () => resolve(false)); |
| 384 | }); |
| 385 | } |
| 386 | |
| 387 | const PLATFORM_LABELS: Record<string, string> = { |
| 388 | github: 'GitHub', |