1

Pipenv updates the commandline output in place. Fabric 1.14.0 sees every update as a new line. This results in lot of superfluous ouput.

I've read the documentation of the run operation. Tried setting capture_buffer_size to 100. Didn't make a difference.

def install_packages():
    "Install packages on the remote host."""
    with cd('/data/repo/'):
        run("pipenv install", capture_buffer_size=100)

Actual results:

[server] run: pipenv install [server] out: Creating a virtualenv for this project…
[server] out: Pipfile: /data/repo/Pipfile
[server] out: Using /usr/bin/python3.5 (3.5.2) to create virtualenv…
[server] out:
[server] out: ⠋ Creating virtual environment... [server] out: ⠙ Creating virtual environment...
[server] out: ⠹ Creating virtual environment...
[server] out: ⠸ Creating virtual environment...

......

[server] out: ✔ Successfully created virtual environment!

Expected results:

[server] run: pipenv install
[server] out: Creating a virtualenv for this project…
[server] out: Pipfile: /data/repo/Pipfile
[server] out: Using /usr/bin/python3.5 (3.5.2) to create virtualenv…
[server] out:
[server] out: ⠋ Creating virtual environment...
[server] out: ✔ Successfully created virtual environment!

1 Answer 1

0

Wrap your run("pipenv install") instruction in a with hide('output') context manager. Remove the capture_buffer_size kwarg.

More information about tuning your output can be found here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.