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 forcing colors #21732

Closed
GerkinDev opened this issue Sep 9, 2021 · 3 comments · Fixed by #21737
Closed

Allow forcing colors #21732

GerkinDev opened this issue Sep 9, 2021 · 3 comments · Fixed by #21737
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Milestone

Comments

@GerkinDev
Copy link

Hi,

I run angular CLI tasks in my own scripts that internally use concurrently. This setup disables colors in the angular CLI issue.

It would be great to be able to force color support via an env var, like FORCE_COLOR.

Related to:

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Sep 9, 2021

FORCE_COLOR is supported by Node.js natively without the need to implement addition logic. See: https://nodejs.org/dist/latest-v12.x/docs/api/tty.html#tty_writestream_getcolordepth_env

The problem here, is that concurrently,stdout implementation doesn't implement Node.js WriteStream, instead it is using RxJs Subject https://github.com/open-cli-tools/concurrently/blob/10ff00cbfbd4dbf1a41a716556b4592a20022fa9/src/command.js#L21 which of course doesn't support the getColorDepth nor FORCE_COLOR APIs.

@ngbot ngbot bot added this to the needsTriage milestone Sep 9, 2021
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely type: bug/fix labels Sep 9, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Sep 9, 2021
filipesilva pushed a commit that referenced this issue Sep 14, 2021
…is not instance of `WriteStream`

In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732
filipesilva pushed a commit that referenced this issue Sep 14, 2021
…f `WriteStream`

In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732
filipesilva pushed a commit that referenced this issue Sep 14, 2021
…is not instance of `WriteStream`

In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732

(cherry picked from commit df8f909)
filipesilva pushed a commit that referenced this issue Sep 14, 2021
…f `WriteStream`

In some cases, custom implementation of stdout, don't extend `WriteStream` which causes colors not to be included in the output.

Closes #21732

(cherry picked from commit d3fa202)
@GerkinDev
Copy link
Author

Thank you for this!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants