Skip to content

Conversation

@JamesWTruher
Copy link
Collaborator

PR Summary

When calculating the InputTypes property of the help object, it includes those parameters which have the ValueFromRemainingArguments attribute. This is not correct.

PR Context

as this demonstrates, VFRA does not allow pipeline binding:

function test-vfra {        
[CmdletBinding()]
param ([Parameter(ValueFromRemainingArguments=$true)][object[]]$c)
Process { "$c" }
}

PS> test-vfra 1 2 3                                                                  
1 2 3
PS> 1 | test-vfra
test-vfra: The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.

PS> (get-help -full test-vfra).inputtypes.inputtype.type.name
System.Object[]

PR Checklist

The parameter attribute FromRemainingArguments is not an indicator of pipeline input.
Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iSazonov iSazonov added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log PowerShell-Docs not needed The PR was reviewed and doesn't appear to require a PowerShell Docs update labels May 30, 2024
@iSazonov iSazonov merged commit 7f99fa1 into PowerShell:master Jun 3, 2024
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Jun 3, 2024

📣 Hey @JamesWTruher, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

chrisdent-de pushed a commit to chrisdent-de/PowerShell that referenced this pull request Sep 12, 2024
…ribute as pipeline-able (PowerShell#23871)

* Remove FromRemainingArguments as an inputs indicator.

The parameter attribute FromRemainingArguments is not an indicator of pipeline input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log PowerShell-Docs not needed The PR was reviewed and doesn't appear to require a PowerShell Docs update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants