You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/PSADT/PSAppDeployToolkit/Logging/LogUtilities.cs
+21-9Lines changed: 21 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ public static IReadOnlyList<LogEntry> WriteLogEntry(IReadOnlyList<string> messag
85
85
else
86
86
{
87
87
// Get the first PowerShell stack frame that contains a valid command.
88
-
CallStackFrameinvoker=ModuleDatabase.InvokeScript(ScriptBlock.Create("& $Script:CommandTable.'Get-PSCallStack'"),null).Skip(1).Select(static o =>(CallStackFrame)o.BaseObject).First(static f =>f.GetCommand()isstringcommand&&!string.IsNullOrWhiteSpace(command)&&(!CallerCommandRegex.IsMatch(command)||(CallerScriptBlockRegex.IsMatch(command)&&CallerScriptLocationRegex.IsMatch(f.GetScriptLocation()))));
88
+
CallStackFrameinvoker=ModuleDatabase.InvokeScript(ScriptBlock.Create("& $Script:CommandTable.'Get-PSCallStack'")).Skip(1).Select(static o =>(CallStackFrame)o.BaseObject).First(static f =>f.GetCommand()isstringcommand&&!string.IsNullOrWhiteSpace(command)&&(!CallerCommandRegex.IsMatch(command)||(CallerScriptBlockRegex.IsMatch(command)&&CallerScriptLocationRegex.IsMatch(f.GetScriptLocation()))));
0 commit comments