Skip to content

fix(@angular/cli): directly remove ansi color codes when no color support #17055

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

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

clydin
Copy link
Member

@clydin clydin commented Feb 23, 2020

Third party libraries can attempt to write color codes to the output even though the CLI has already determined that color should not be used. The previously implemented color removal code is no longer functional since the update of ansi-colors to 4.1.0. While this appears to be a defect in the aforementioned package, the new CLI removal method not only bypasses the defect but also unneeded execution logic that the CLI does not need in this case.

Fixes: #17053

…port

Third party libraries can attempt to write color codes to the output even though the CLI has already determined that color should not be used.  The previously implemented color removal code is no longer functional since the update of ansi-colors to 4.1.0.  While this appears to be a defect in the aforementioned package, the new CLI removal method not only bypasses the defect but also unneeded execution logic that the CLI does not need in this case.

Fixes: angular#17053
@clydin clydin added the target: patch This PR is targeted for the next patch release label Feb 23, 2020
@clydin clydin requested a review from alan-agius4 February 23, 2020 13:07
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Feb 24, 2020
@dgp1130 dgp1130 merged commit e221c9a into angular:master Feb 24, 2020
@clydin clydin deleted the remove-color-workaround branch February 24, 2020 20:41
@dgp1130
Copy link
Collaborator

dgp1130 commented Feb 24, 2020

Also merged to patch branch (9.0.x).

@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 Mar 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular CLI can't tell when stdout isn't a TTY, always outputs ANSI
4 participants