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'm finally porting Carthage from sh 1.x to sh 2.x. We had our own hack to enable async for sh, and we had a lot of code that did things like
result=awaitsh.ssh(...)
And then for example looked at result.stdout.
So, part of this can be handled by setting _return_cmd=True, but the definition of RunningCommand.__await__ is hard-coded to return str(self).
Obviously, I can do something like
result=sh.ssh(...)
awaitresult
But that feels clumsy.
I'd like a kwarg that returns a RunningCommand even on async await.
My preference would be to try and convince you that _return_cmd should affect await as well as call, but if you are concerned about the API instability, I'm happy with anything that I can pass into bake.
Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
I think that's a reasonable request, and the way the api should work. The fact that it doesn't seems to be incorrect behavior. Do you feel comfortable making this change?
Yes. I'll send in a pull request tomorrow.
The change is trivial, learning your test system enough to propose tests
will take most of the time.
But I've been working with sh long enough I should go learn the test
system anyway.
I'm finally porting Carthage from sh 1.x to sh 2.x. We had our own hack to enable async for sh, and we had a lot of code that did things like
And then for example looked at
result.stdout
.So, part of this can be handled by setting
_return_cmd=True
, but the definition ofRunningCommand.__await__
is hard-coded to returnstr(self)
.Obviously, I can do something like
But that feels clumsy.
I'd like a kwarg that returns a RunningCommand even on async await.
My preference would be to try and convince you that
_return_cmd
should affect await as well as call, but if you are concerned about the API instability, I'm happy with anything that I can pass into bake.Thanks for your consideration.
The text was updated successfully, but these errors were encountered: