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 get errors saying that output and getOutput are protected? And I guess that is ok, but it's a bit counter intuitive.
Isn't Robo supposed to be a task runner where it's primary function is to interact with and run shell commands ?
If so then i kinda hoped it would be easier to get at the results of executed shell commands. Why are they protected?
Is there a nifty way to get at this output? I didn't see any examples in the docs.
Next I guess I'll try something like what's mentioned here ( #1097 (comment) )
CommandResult::data($result['my_list']);
I'm not sure if this is related to ( #858 ) but it kind of sounds similar.
Is there an easy way to get at the commands output? Sorry if I missed it in the documentation.
The text was updated successfully, but these errors were encountered:
One thing I want to emphasize is that you do not need to use Robo exclusively in programs that use Robo. Robo is great for a task runner, but it's not a great wrapper around exec or Symfony Process. These tasks exist, in case you need to throw an exec into a chain of tasks; if you're just trying to run a program to get some data to set up your tasks, you're probably better off just using one of those lower level APIs directly.
When I do something like this in a task:
I see the output of that "bash" command printed to the terminal. I'm guessing this is via ( https://github.com/consolidation/robo/blob/3.x/src/Result.php#L274)
So the resulting output is buried in there somewhere in the result. However it seems protected.
When I try
or
I tried this because it seems like robo is using the symfony methods & classes like ( https://symfony.com/doc/current/components/process.html#streaming-to-the-standard-input-of-a-process )
I get errors saying that output and getOutput are protected? And I guess that is ok, but it's a bit counter intuitive.
Isn't Robo supposed to be a task runner where it's primary function is to interact with and run shell commands ?
If so then i kinda hoped it would be easier to get at the results of executed shell commands. Why are they protected?
Is there a nifty way to get at this output? I didn't see any examples in the docs.
Next I guess I'll try something like what's mentioned here ( #1097 (comment) )
I'm not sure if this is related to ( #858 ) but it kind of sounds similar.
Is there an easy way to get at the commands output? Sorry if I missed it in the documentation.
The text was updated successfully, but these errors were encountered: