New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-Octopus* parameters should be string[ ] instead of List<string> #244

Closed
Dalmirog opened this Issue Mar 20, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@Dalmirog
Owner

Dalmirog commented Mar 20, 2017

Powershell doesn't seem to like it too much when the parameter type is List<String> instead of String [] which seems to be the standard. A clear proof of this is what you see when you get-help a cmdlet:

C:\Tools
λ Get-Help Get-OctopusMachine -Parameter MachineName

-MachineName <List`1>
    Name of the Machine to filter by

    Required?                    false
    Position?                    1
    Default value
    Accept pipeline input?       true (ByValue)
    Accept wildcard characters?  false

Or when you check the cmdlet examples:

INPUTS
    System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089]]
        Name of the Machine to filter by

    System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089]]
        Name of the Environment to filter by

    System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089]]
        Target URI to filter by

    System.String
        Target communication style to filter by

And finally it also breaks the programatically generated help in the wiki:

parametertype

So I'm changing the parameters to accept string[] and then handling them as List<string> in the code.

@Dalmirog Dalmirog added this to the 0.6.1/1.0.1-Beta milestone Mar 20, 2017

@Dalmirog Dalmirog self-assigned this Mar 20, 2017

@Dalmirog Dalmirog closed this Mar 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment