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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Improve color logic when invoking package managers' install ",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ export class WorkspaceInstallManager extends BaseInstallManager {
this.rushConfiguration,
this.options
);
if (colors.enabled) {
packageManagerEnv.FORCE_COLOR = '1';
}

const commonNodeModulesFolder: string = path.join(
this.rushConfiguration.commonTempFolder,
Expand All @@ -318,7 +321,7 @@ export class WorkspaceInstallManager extends BaseInstallManager {
// Run "npm install" in the common folder
// To ensure that the output is always colored, set the option "--color=always", even when it's piped.
// Without this argument, certain text that should be colored (such as red) will appear white.
const installArgs: string[] = ['install', '--color=always'];
const installArgs: string[] = ['install'];
this.pushConfigurationArgs(installArgs, options);

// eslint-disable-next-line no-console
Expand Down