Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/docker-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ export async function startContainers(workDir: string, allowedDomains: string[],
}
await execa('docker', composeArgs, {
cwd: workDir,
stdio: 'inherit',
stdio: ['ignore', 'ignore', 'inherit'], // Only inherit stderr for errors, ignore stdout to prevent container names appearing in output
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stdio: ['ignore', 'ignore', 'inherit'] also changes stdin from inherited to ignored. If the goal is only to suppress Docker stdout, consider inheriting stdin and only ignoring stdout (e.g., keep stdin as inherit) to avoid an unnecessary behavior change for interactive/TTY-sensitive Docker commands.

This issue also appears on line 1136 of the same file.

Suggested change
stdio: ['ignore', 'ignore', 'inherit'], // Only inherit stderr for errors, ignore stdout to prevent container names appearing in output
stdio: ['inherit', 'ignore', 'inherit'], // Only inherit stderr for errors, ignore stdout to prevent container names appearing in output

Copilot uses AI. Check for mistakes.
});
logger.success('Containers started successfully');

Expand Down Expand Up @@ -1307,7 +1307,7 @@ export async function stopContainers(workDir: string, keepContainers: boolean):
// Normal path: use docker compose down
await execa('docker', ['compose', 'down', '-v'], {
cwd: workDir,
stdio: 'inherit',
stdio: ['ignore', 'ignore', 'inherit'], // Ignore stdout to prevent container names appearing in output
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stopContainers() unit tests currently expect docker compose down -v to be invoked with stdio: 'inherit', but this call now uses a different stdio config. Also, stopContainers() only takes the compose-down branch when docker-compose.yml exists; the test should either create that file to exercise this branch or update expectations to match the fallback path.

Suggested change
stdio: ['ignore', 'ignore', 'inherit'], // Ignore stdout to prevent container names appearing in output
stdio: 'inherit',

Copilot uses AI. Check for mistakes.
});
logger.success('Containers stopped successfully');
} else {
Expand All @@ -1322,7 +1322,7 @@ export async function stopContainers(workDir: string, keepContainers: boolean):
const { stdout } = await execa('docker', ['ps', '-aq', '-f', `name=^${name}$`]);
if (stdout.trim()) {
logger.debug(`Stopping container: ${name}`);
await execa('docker', ['rm', '-f', name], { stdio: 'inherit' });
await execa('docker', ['rm', '-f', name], { stdio: ['ignore', 'ignore', 'inherit'] }); // Ignore stdout to prevent container names appearing in output
}
} catch (err) {
logger.debug(`Could not stop container ${name}:`, err);
Expand Down
Loading