From 930b2400a772f4a93940330ad4808ca783e2462d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:30:12 +0000 Subject: [PATCH] Update OperationExecutionRecord to only set logFilePaths conditionally Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/32548397-4715-49df-ac93-946ff98db320 --- ...et-logfilepaths-conditionally_2026-03-20-22-27.json | 10 ++++++++++ .../src/logic/operations/OperationExecutionRecord.ts | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 common/changes/@microsoft/rush/copilot-patch-set-logfilepaths-conditionally_2026-03-20-22-27.json diff --git a/common/changes/@microsoft/rush/copilot-patch-set-logfilepaths-conditionally_2026-03-20-22-27.json b/common/changes/@microsoft/rush/copilot-patch-set-logfilepaths-conditionally_2026-03-20-22-27.json new file mode 100644 index 00000000000..e5b20c0b1d4 --- /dev/null +++ b/common/changes/@microsoft/rush/copilot-patch-set-logfilepaths-conditionally_2026-03-20-22-27.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Update OperationExecutionRecord to only set `this.logFilePaths` if the value to be assigned is not `undefined`", + "type": "patch" + } + ], + "packageName": "@microsoft/rush" +} diff --git a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts index 63da9421b54..8ff0034b716 100644 --- a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts +++ b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts @@ -307,7 +307,9 @@ export class OperationExecutionRecord implements IOperationRunnerContext, IOpera logFilenameIdentifier: `${this._operationMetadataManager.logFilenameIdentifier}${logFileSuffix}` }) : undefined; - this.logFilePaths = logFilePaths; + if (logFilePaths !== undefined) { + this.logFilePaths = logFilePaths; + } const projectLogWritable: TerminalWritable | undefined = logFilePaths ? await initializeProjectLogFilesAsync({