Tyrrrz / CliWrap

Library for running command-line processes
MIT License
4.32k stars 264 forks source link

Allow input midway through a script's execution #220

Closed thomhurst closed 10 months ago

thomhurst commented 10 months ago

Details

From what I can tell, input is piped to a process immediately when the process has begun.

However, some scripts might ask for prompts.

But if I have an input stream pipe, trying to write to it at the time I have a prompt does nothing.

Checklist

Tyrrrz commented 10 months ago

This is already possible using the approach described in https://github.com/Tyrrrz/CliWrap/issues/191#issuecomment-1385743785

thomhurst commented 10 months ago

Hmm it's seems a powershell Read-Host command doesn't seem to trigger any command events?

Tyrrrz commented 10 months ago

I don't know how Read-Host works specifically, but it might be that the prompt isn't actually written to stdout.

thomhurst commented 10 months ago

Yeah I think you're right. I don't really think there's a workaround then for what I'm trying

Tyrrrz commented 10 months ago

Going to close this now since the issue doesn't seem specific to CliWrap