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

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

Closed
codykonior opened this issue Dec 15, 2016 · 3 comments

Comments

@codykonior
Copy link
Contributor

codykonior commented Dec 15, 2016

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.

@proxb proxb added the bug label Dec 15, 2016
@proxb proxb self-assigned this Dec 15, 2016
proxb added a commit that referenced this issue Jan 14, 2017
@proxb
Copy link
Owner

proxb commented Jan 14, 2017

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

@codykonior
Copy link
Contributor Author

Yes it's fixed.

@nathanmjones
Copy link

nathanmjones commented Mar 2, 2017

1.7.3.6 did the trick.. thanks v much
failed to import direct from gallery, was worried, manual import worked tho..

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

No branches or pull requests

3 participants