Skip to content
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

Write-PodeHtmlResponse returns the wrong result when an array of strings is piped. #1272

Closed
mdaneri opened this issue Mar 29, 2024 · 0 comments · Fixed by #1319
Closed

Write-PodeHtmlResponse returns the wrong result when an array of strings is piped. #1272

mdaneri opened this issue Mar 29, 2024 · 0 comments · Fixed by #1319
Labels

Comments

@mdaneri
Copy link
Contributor

mdaneri commented Mar 29, 2024

Describe the Bug

Write-PodeHtmlResponse returns the wrong result when an array of strings is piped.
It works correctly if the array is passed as a parameter.

Steps To Reproduce

Steps to reproduce the behavior:

Add-PodeRoute -Path '/processesPipedNotWorking'  -Method Get -ScriptBlock {
        Get-Process | .{ process { if ($_.WS -gt 100mb) { $_ } } } |
            Select-Object Name, @{e = { [int]($_.WS / 1mb) }; n = 'WS' } |
            Sort-Object WS -Descending | Write-PodeHtmlResponse  -StatusCode 200
    }

This bug has been discovered during the resolution of #1257

Target Pode version 2.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
1 participant