You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wanting to abort a ThreadJob early if $LASTEXITCODE doesn't equal 0. Throwing accomplishes that, but I'm wanting the return value to only be the stderr output of the native application.
Here's what I would like if exit 1 hypothetically set the job's State property to "Failed":
My problem with this is that the redirection wrapping you have to resort to is very kludgy, with $err being the outermost variable being set and the proper output set within a subexpression. I'm hoping for an alternative.
As mentioned before, exit 1 would be great, though I'm not sure how you'd feel about that producing a different State result from it being used in a BackgroundJob, since it doesn't work there either.
The text was updated successfully, but these errors were encountered:
I am wanting to abort a ThreadJob early if $LASTEXITCODE doesn't equal 0. Throwing accomplishes that, but I'm wanting the return value to only be the stderr output of the native application.
Here's what I would like if
exit 1
hypothetically set the job'sState
property to "Failed":And here is my current, ugly workaround:
My problem with this is that the redirection wrapping you have to resort to is very kludgy, with
$err
being the outermost variable being set and the proper output set within a subexpression. I'm hoping for an alternative.As mentioned before,
exit 1
would be great, though I'm not sure how you'd feel about that producing a differentState
result from it being used in a BackgroundJob, since it doesn't work there either.The text was updated successfully, but these errors were encountered: