Comments (4)
The reason the output doesn't look right is that minikube
manipulates the console window directly (by moving the cursor) when writing the output. I believe that not redirecting streams might not be enough, and you might also have to unset CreateNoWindow
as well to allow the child process to properly take ownership of the parent process's console. I'm not sure, you'd have to test it.
The issue with not redirecting streams is that it will introduce diverging logic inside CliWrap that would have to be tested separately. Considering that 99% of CliWrap's functionality relies on piping, it doesn't make much sense.
I'd recommend using the raw Process
for things like this. If you are not interested in piping, then it offers an adequate experience as it is. You can also use CliWrap's ArgumentsBuilder
, EnvironmentVariablesBuilder
, etc. with it if you want.
from cliwrap.
I completely understand your argument. My current workaround is to write a wrapper around raw Process
as you described, in order to facilitate this use case, but i currently find myself duplicating alot of CliWrap's existing functionality.
I understand CliWrap being primarily focused around pipes, but i find it really good as a generic constructor for generel process execution. If this option was implemented in the future i do not see why CliWrap could not completely replace the use of Process
.
However i understand and accept the answer you provided 🙂 Just a bit of feedback from my side 👍
from cliwrap.
I can empathize with the issue of having to use two tools for what seems like the same job. I've given it thought in the past, and there just doesn't seem to be a good and seamless way to add the no-piping scenario to CliWrap, from a design perspective. There are always going to be things that Process
can do that CliWrap can't and that's fine – the former is a much more general purpose class, and most of CliWrap's utility comes from its focus on one very specific use case: running command line programs and getting their output.
from cliwrap.
Hi again @Tyrrrz
Since writing this issue, i have worked on my own solution to this problem and have been using it in a project for some time.
I have now extracted it into a fork of CliWrap called CliCommander, and was hoping to get your input on the project.
I would have preferred some kind of solution directly in CliWrap, but i can understand your reasoning behind this, so i hope you are ok with me maintaining this solution on the side.
It does borrow alot of code from CliWrap, and copies some internal classes that was needed.
I am not going to implement any further functionality into CliCommander, i just plan on aligning it with CliWrap whenever it gets updated.
from cliwrap.
Related Issues (20)
- Invalid encoding when running a specific executable on Windows HOT 4
- Cannot be used in IIS? HOT 6
- Stdout and stderr order not preserved HOT 10
- Windows 11 throws exception for some arguments passed to SqlPackage HOT 6
- Support intermediate pipe handlers to transform output from one command into input for another HOT 11
- Not getting the proper response from docker command HOT 5
- Add `WithArguments` overload (or new method) that allows appending arguments to an existing command HOT 2
- Command can deadlock if the process writes large output and one of the targets inside `PipeTarget.Merge(...)` throws
- Problem with stdOut HOT 8
- When using .NET Framework instead of .NET Core, there are problems with stdin encoding HOT 10
- UnicodeEncodeError when Python program outputs unicode HOT 4
- Allow forced argument escaping HOT 5
- Allow input midway through a script's execution HOT 5
- Option to allocate a pseudo-terminal for running command-line applications HOT 1
- `telnet` command is throwing 'No such file or directory' error HOT 4
- Argument Escaping HOT 1
- Ignore waiting for output stream when main process is finished, but it has active children reusing the same output streams HOT 1
- ExecuteBufferedAsync - Access a merged Stdout and Sterror HOT 1
- Ask for the "PrivacyInfo.xcprivacy" required by Apple HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cliwrap.