-
Notifications
You must be signed in to change notification settings - Fork 6
fix: prevent docker output from contaminating command stdout #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
| }); | ||||||
| logger.success('Containers started successfully'); | ||||||
|
|
||||||
|
|
@@ -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 | ||||||
|
||||||
| stdio: ['ignore', 'ignore', 'inherit'], // Ignore stdout to prevent container names appearing in output | |
| stdio: 'inherit', |
There was a problem hiding this comment.
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.