Giter VIP home page Giter VIP logo

Comments (4)

Tyrrrz avatar Tyrrrz commented on July 24, 2024

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.

Baune8D avatar Baune8D commented on July 24, 2024

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.

Tyrrrz avatar Tyrrrz commented on July 24, 2024

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.

Baune8D avatar Baune8D commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.