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

[rush-lib] Remove "--color=always" option when invoking pnpm install #4389

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

theJiawen
Copy link
Contributor

@theJiawen theJiawen commented Oct 9, 2023

Why we needed the color=always option? The following screenshot shows that the error would be white instead of red without the option (this is because the custom tips feature redirected the pnpm output to a PassThrough stream, and PNPM output would be colored only when the output is a terminal or TTY).

image

But this color=always would cause another problem: in a CI environment that doesn't support colors, it would be like, "This next word should be 35m]purple34m];".

Hence, in this fix, we pass along Rush's own state (color.enabled) to pnpm – assuming Rush could determine this state correctly. Besides, we don't use the --color=always cli option but use the FORCE_COLOR environment variable because we want PNPM's child process also to print colors.

@iclanton
Copy link
Member

iclanton commented Oct 9, 2023

This needs a changelog entry.

@theJiawen theJiawen changed the title Remove "--color=always" option when invoking pnpm install [rush-lib] Remove "--color=always" option when invoking pnpm install Oct 9, 2023
@octogonz octogonz merged commit 118feea into microsoft:main Oct 10, 2023
5 checks passed
@octogonz
Copy link
Collaborator

🚀 Released with Rush 5.109.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants