pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.42k stars 370 forks source link

when running a command, stdin requires a keypress on Windows #1007

Open bevancollins opened 2 months ago

bevancollins commented 2 months ago

I am wanting to pass a file to the stdin of a command on Windows type file.txt | inv doecho

where:

import invoke

@invoke.task()
def doecho(ctx):
    ctx.run('more')

more is run but waits until a key is pressed and then executes as expected. This is nothing to do with more.. the same result can be seen when running cat from cygwin or anything else that reads from stdin