Skip to content
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

allow a TTY to be allocated with -t #10180

Merged
merged 1 commit into from Jan 19, 2023
Merged

allow a TTY to be allocated with -t #10180

merged 1 commit into from Jan 19, 2023

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jan 19, 2023

What I did
Allow user to force a TTY to be allocated for container started by compose run. This allows to pipe compose output to another process but still get ANSI color support. -it flags were initially introduced to align with docker run considering this was a no-op flag as being default behavior by Docker Compose. But with terminal capability detection this is not the case and -T is enabled automatically.

Related issue
closes #10161

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 73.89% // Head: 73.89% // No change to project coverage 👍

Coverage data is based on head (8e878df) compared to base (c15bf19).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10180   +/-   ##
=======================================
  Coverage   73.89%   73.89%           
=======================================
  Files           2        2           
  Lines         272      272           
=======================================
  Hits          201      201           
  Misses         60       60           
  Partials       11       11           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ndeloof ndeloof requested review from a team, nicksieger, StefanScherer, ulyssessouza, glours, milas and laurazard and removed request for a team January 19, 2023 13:55
cmd/compose/run.go Outdated Show resolved Hide resolved
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@ndeloof ndeloof merged commit e94eb05 into docker:v2 Jan 19, 2023
@ndeloof ndeloof deleted the tty branch January 19, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] docker compose run does not preserve colored output when piped to tee
3 participants