Skip to content

Example 2 of Install-ChocolateyPowerShellCommand has a duplicated parameter #861

Open
@corbob

Description

@corbob

What You Are Seeing?

On this page, Example 2 contains PSFileFullPath twice. This will actually result in a parsing error from PowerShell:

PS> Get-ChildItem -Recurse -Recurse
Get-ChildItem : Cannot bind parameter because parameter 'Recurse' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter
value1,value2,value3".
At line:1 char:24
+ Get-ChildItem -Recurse -Recurse
+                        ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
    + FullyQualifiedErrorId : ParameterAlreadyBound,Microsoft.PowerShell.Commands.GetChildItemCommand

What is Expected?

The example should work without parsin error.

How Did You Get This To Happen? (Steps to Reproduce)

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions