Skip to content

allow a TTY to be allocated with -t - #10180

Merged
ndeloof merged 1 commit into
docker:v2from
ndeloof:tty
Jan 19, 2023
Merged

ndeloof merged 1 commit into
docker:v2from
ndeloof:tty

Conversation

@ndeloof

@ndeloof ndeloof commented Jan 19, 2023

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Jan 19, 2023 •

Copy link
Copy Markdown

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, StefanScherer, glours, laurazard, milas, nicksieger and ulyssessouza and removed request for a team January 19, 2023 13:55
Comment thread cmd/compose/run.go Resolved
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

@glours glours left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

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