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

codykonior opened this Issue Dec 15, 2016 · 2 comments


None yet

2 participants

codykonior commented Dec 15, 2016 edited

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) {

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

@proxb proxb added the bug label Dec 15, 2016
@proxb proxb self-assigned this Dec 15, 2016
@proxb proxb added a commit that referenced this issue Jan 14, 2017
@proxb Updates to module
#119 #95 #111 resolved
proxb commented Jan 14, 2017

@codykonior This should be fixed now, please test and let me know the results.


Yes it's fixed.

@codykonior codykonior closed this Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment