MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / runComposeCommand

Function runComposeCommand

packages/setupWizard/src/index.ts:370–385  ·  view source on GitHub ↗
(args: string[], label: string)

Source from the content-addressed store, hash-verified

368}
369
370async 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
387const PLATFORM_LABELS: Record<string, string> = {
388 github: 'GitHub',

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected