Skip to content

Commit

Permalink
Merge pull request #4389 from theJiawen/jiawen/fix-color
Browse files Browse the repository at this point in the history
[rush-lib] Remove "--color=always" option when invoking pnpm install
  • Loading branch information
octogonz authored Oct 10, 2023
2 parents e8db1da + b5b0a47 commit 118feea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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

0 comments on commit 118feea

Please sign in to comment.