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

Handle output collections properly #273

Closed
Dalmirog opened this Issue May 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@Dalmirog
Owner

Dalmirog commented May 29, 2017

Users should be able to filter objects from the pipeline by doing something like this:

Get-OctopusDashboard | ?{$_.EnvironmentName -eq "Production"}

Given the current implementation (pre 0.6.9), the get cmdlets are returning a single list object, instead of all the objects to the pipeline. This forces users to work around it like this:

$dashboard = GetOctopusDashboard
$dashboard | ?{$_.EnvironmentName -eq "Production"}

To fix this all that needs to be done is set the enumerateCollection parameter of WriteObject to true in all the Get cmdlets.

Related MS doc that I wish it didn't take me like 2 hours and 3 tweets to find: https://msdn.microsoft.com/en-us/library/ms568370(v=vs.85).aspx

@Dalmirog Dalmirog added the bug label May 29, 2017

@Dalmirog Dalmirog added this to the 0.6.9/1.0.0-Beta9 milestone May 29, 2017

@Dalmirog Dalmirog self-assigned this May 29, 2017

@Dalmirog Dalmirog removed this from the 0.6.9/1.0.0-Beta9 milestone Jun 8, 2017

@Dalmirog Dalmirog added this to the 0.6.10/1.0.0-Beta10 milestone Jul 7, 2017

@Dalmirog Dalmirog closed this in 9d26863 Jul 7, 2017

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