Conversation
|
Is it possible to have a new case ( |
|
You are right, I haven't thought about directly passing a stream to the Is this what you had in mind ? |
|
Yes, that is what I meant. 🙂 One small thing, could you please add the Lines 283 to 286 in 334b1bc |
|
I have updated the README, can you tell me if it's ok with you ? Have you given some thoughts about my comments regarding the issue #63 you mentioned ? I have started a review but I don't know if you can see it on your end. |
|
The README and your code looks beautiful. 👌🏻 The code doesn't build, that needs to be fixed. I can't see any comments on my side from you. Could you list them in this discussion? |
|
Thank you for the kind comment ! The build error seems to have come from the use of the new .Is* property : Discriminated union .Is* properties My comments regarding the issue #63 went as follow : For the following file For the following file |
I would update the pipeline in a separated PR. To your comments: these changes would change the whole library but using it with the stream option and relay the output to a file would minimize the mentioned memory issues in #63, isn't it? |
|
Oops, I kept mentioning the PR while referring to the issue #63 (fixed it in the earlier posts). Yes exactly, with this change, redirecting the output to a file would ensure that the variable Now that I think about it, maybe the user would expect the functions ( It's also possible to create a new function that will take a string and the let sb = StringBuilder()
cli {
Shell CMD
Command "echo Test"
Output (new StringWriter(sb))
}
|> Command.execute
|> Output.From sb.ToString() // The new function
// the functions (`toText`,` `printText`, `toError`...) now work as intendedIt's also possible to keep it as is or if you have any other ideas. which one do you prefer ? |
This solution looks beautiful, you can implement it. 🙂 |
…o save a given string into an output object
…e stream option and how to fix it
|
I have added the discussed method |
e0f8473 to
c13aee6
Compare
|
First sight looks good. I will look closer in the next few days. |
|
Hey @flsl0, |
|
Sorry for the delay, I have a lot to do in my life right now. |
Hello,
I have added a new option that allows a process to stream its output to a specified source.
Basically I just duplicated the
Outputoption and passed the given function to theOutputDataReceivedandErrorDataReceivedcallbacks.