Assign the value returned by the MaybeAdd method

This commit is contained in:
Patrick Meinecke
2024-12-11 15:31:04 -05:00
committed by Patrick Meinecke
parent 294adb47f1
commit 36740ab4a2
@@ -6947,7 +6947,7 @@ namespace System.Management.Automation.Language
// - Log method invocation to AMSI Notifications (can throw PSSecurityException)
// - Invoke method
string targetName = methodInfo.ReflectedType?.FullName ?? string.Empty;
MaybeAddMemberInvocationLogging(expr, targetName, name, args);
expr = MaybeAddMemberInvocationLogging(expr, targetName, name, args);
// If we're calling SteppablePipeline.{Begin|Process|End}, we don't want
// to wrap exceptions - this is very much a special case to help error