From b60b313c3260c2438af87cecc826d1154fe95a29 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 12 May 2025 09:53:24 -0700 Subject: [PATCH 1/2] Remove [] from typenames for input and output --- src/Transform/TransformBase.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Transform/TransformBase.cs b/src/Transform/TransformBase.cs index 6a683ccc..cda03e04 100644 --- a/src/Transform/TransformBase.cs +++ b/src/Transform/TransformBase.cs @@ -101,11 +101,6 @@ commandInfo is CmdletInfo || private string GetAdjustedTypename(Type t, bool simplify = false) { string tName = simplify ? LanguagePrimitives.ConvertTo(t) : t.FullName; - if (tName.EndsWith("[]")) - { - tName = FixUpTypeName(tName); - } - return tName; } From ad3fee7788c72cdcf6e5c294f20f2ba8f5e60113 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 12 May 2025 10:06:11 -0700 Subject: [PATCH 2/2] Update test --- test/Pester/ConvertToCommandHelp.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Pester/ConvertToCommandHelp.Tests.ps1 b/test/Pester/ConvertToCommandHelp.Tests.ps1 index 9dd5d64d..6a2aafa8 100644 --- a/test/Pester/ConvertToCommandHelp.Tests.ps1 +++ b/test/Pester/ConvertToCommandHelp.Tests.ps1 @@ -175,7 +175,7 @@ Describe "New-CommandHelp tests" { It "Should have the input type ''" -TestCases @( @{ Type = "System.Management.Automation.CommandTypes" } @{ Type = "System.Int32" } - @{ Type = "Microsoft.PowerShell.Commands.ModuleSpecification" } + @{ Type = "Microsoft.PowerShell.Commands.ModuleSpecification[]" } @{ Type = "System.String" } @{ Type = "System.Management.Automation.SwitchParameter" } ) {