When using the invoke library from Windows, it seems like no output is printed to the terminal if the command spans multiple lines. Here's an example to reproduce; put this in tasks.py
.
import invoke
@invoke.task
def test_oneline(ctx):
ctx.run("pip install nonexistant-package1234")
@invoke.task
def test_multiline(ctx):
ctx.run(
"""
pip install nonexistant-package1234
"""
)
Then, from the command prompt in the same directory as tasks.py
, I get the following:
>invoke test-oneline
Collecting nonexistant-package1234
Could not find a version that satisfies the requirement nonexistant-package1234 (from versions: )
No matching distribution found for nonexistant-package1234
>
>invoke test-multiline
>
Doing the same thing on Linux (well, at least Windows Subsystem for Linux) works as expected:
$ invoke test-multiline
Collecting nonexistant-package1234
Could not find a version that satisfies the requirement nonexistant-package1234 (from versions: )
No matching distribution found for nonexistant-package1234
$
Is there a way to get the output printed in Windows for multi-line commands?