Skip to content

Passing an empty batch to Wait-RSJob stops all further processing in the caller #119

@codykonior

Description

@codykonior

This is a bug. Reproduce with an unused batch number such as:

Get-RSJob -Batch "123" | Wait-RSJob; "Hi";

Does not show Hi. All processing in any caller (like a function) stops at this point because the caller exits. It's caused by Line 119 in Wait-RSJob.ps1

        If ($List.count -eq 0) {
            BREAK
        }  

It seems that break here has pretty bad (for me) unintended consequences. Replacing it with a return appears to work better.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions