From ba5d3efd2a768ffd61f68d6132a8494f44d3a3a8 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 15 Oct 2019 17:50:11 -0700 Subject: [PATCH 1/2] disable strict mode in script --- .../DefaultFormatters/PowerShellCore_format_ps1xml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs index 21f529e67ac..42df4e06cf1 100644 --- a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs +++ b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs @@ -736,6 +736,8 @@ private static IEnumerable ViewsOf_System_Management_Autom .GroupByProperty("PSErrorIndex", label: "ErrorIdentifier") .StartEntry() .AddScriptBlockExpressionBinding(@" + Set-StrictMode -Off + $maxDepth = 10 $ellipsis = ""`u{2026}"" $resetColor = '' From 5518a940f0e8bf3f72fc28c943655292f2b3b448 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 15 Oct 2019 17:52:40 -0700 Subject: [PATCH 2/2] rename ErrorIdentifer to ErrorIndex --- .../DefaultFormatters/PowerShellCore_format_ps1xml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs index 42df4e06cf1..4bfecc19da8 100644 --- a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs +++ b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs @@ -733,7 +733,7 @@ private static IEnumerable ViewsOf_System_Management_Autom { yield return new FormatViewDefinition("GetErrorInstance", CustomControl.Create() - .GroupByProperty("PSErrorIndex", label: "ErrorIdentifier") + .GroupByProperty("PSErrorIndex", label: "ErrorIndex") .StartEntry() .AddScriptBlockExpressionBinding(@" Set-StrictMode -Off