diff --git a/common/changes/@microsoft/rush/fix-empty-error-logs_2024-11-08-01-18.json b/common/changes/@microsoft/rush/fix-empty-error-logs_2024-11-08-01-18.json new file mode 100644 index 00000000000..3b10ce20ccd --- /dev/null +++ b/common/changes/@microsoft/rush/fix-empty-error-logs_2024-11-08-01-18.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix an issue where empty error logs were created for operations that did not write to standard error.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts index cac65421518..a281a31ad65 100644 --- a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts +++ b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts @@ -148,7 +148,7 @@ export class SplitLogFileWritable extends TerminalWritable { this.errorLogPath = errorLogPath; this._logWriter = FileWriter.open(logPath); - this._errorLogWriter = FileWriter.open(errorLogPath); + this._errorLogWriter = undefined; } // Override writeChunk function to throw custom error