Comments (8)
I reproduced this, looks like there are two issues:
- When copying stdin from a stream, the data is not flushed at earliest opportunity.
- When the underlying command finishes before stdin is fully read (in this case
Console.OpenStandardInput()
is not closed during command's lifetime and is technically infinite) then the execution deadlocks
I'm working on a fix now.
from cliwrap.
@Tyrrrz yes, tested this with 3.1.0 in the repro project I set up, and it works perfectly now. Thanks for the speedy fix! 👍
from cliwrap.
Does it work if you insert the end-of-input character (^z
aka ctrl+z
)?
from cliwrap.
It definitely changes something, but I can't make sense of exactly what's happening. It's like, nothing happens until I send ^Z
+ Enter
(just ^Z
does nothing) and at that point it looks a bit like git.exe
processes all the input.
First the prompt shows, then I type a
+ Enter
+ n
+ Enter
, then ^Z
+ Enter
and then git.exe
exits with exit code 1.
Does it tell you anything?
from cliwrap.
I created a simple repo to help with reproduction: https://github.com/paynecrl97/FileMergeConflicts
- Clone the repo, and checkout the
master
branch. - Use Git to merge the
mergeMeIntoMaster
branch intomaster
. You'll encounter conflicts, this is expected. - Run the program at the top of this thread (you'll need to change the working directory to the directory that you cloned the repo to)
from cliwrap.
Thanks for the repro, I'll check it when I have a bit more time.
from cliwrap.
Released a fix.
from cliwrap.
@DaRosenberg curious if you've tried the new version already and it works as you expect.
from cliwrap.
Related Issues (20)
- Invalid encoding when running a specific executable on Windows HOT 4
- Possibility to not redirect certain process streams 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 using `ProcessStartInfo.ArgumentList` 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.