Skip to content

Commit

Permalink
fix: CommandInfo.CouldPipeType Alias support (Fixes #560)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 6, 2023
1 parent 5fd3960 commit 17e0a8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Types/CommandInfo/CouldPipe.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
param([PSObject]$InputObject)

:nextParameterSet foreach ($paramSet in $this.ParameterSets) {
$parameterSets =
if ($this.ResolvedCommand.ParameterSets) {
$this.ResolvedCommand.ParameterSets
} elseif ($this.ParameterSets) {
$this.ParameterSets
}

:nextParameterSet foreach ($paramSet in $parameterSets) {
if ($ParameterSetName -and $paramSet.Name -ne $ParameterSetName) { continue }
$params = @{}
$mappedParams = [Ordered]@{} # Create a collection of mapped parameters
Expand Down
9 changes: 8 additions & 1 deletion Types/CommandInfo/CouldPipeType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ param(
$Type
)

:nextParameterSet foreach ($paramSet in $this.ParameterSets) {
$parameterSets =
if ($this.ResolvedCommand.ParameterSets) {
$this.ResolvedCommand.ParameterSets
} elseif ($this.ParameterSets) {
$this.ParameterSets
}

:nextParameterSet foreach ($paramSet in $parameterSets) {
if ($ParameterSetName -and $paramSet.Name -ne $ParameterSetName) { continue }
$params = @{}
$mappedParams = [Ordered]@{} # Create a collection of mapped parameters
Expand Down

0 comments on commit 17e0a8f

Please sign in to comment.